{$APPTYPE CONSOLE}

const
  NMAX = 100;

var
  n,wcnt,i,j,k: Integer;
  w: array[1..NMAX] of String;
  s: String;
  a: array[1..NMAX+1,1..NMAX+1] of Byte;

function check(x: String): boolean;
var
  l,r,m: Integer;
begin
  l:=1; r := wcnt;
  repeat
    m := (l+r) div 2;
    if x=w[m] then begin
      check := true;
      exit;
    end;
    if x<w[m] then r:=m-1 else l:=m+1;
  until (l>r);
  check := false;
end;

begin

//  assign(input,'input.txt'); reset(input);
//  assign(output,'output.txt'); rewrite(output);

  readln(wcnt);
  for i:=1 to wcnt do readln(w[i]);
  for i:=1 to wcnt-1 do
    for j:=i+1 to wcnt do
      if w[i]>w[j] then
      begin
        s := w[i]; w[i] := w[j]; w[j]:=s;
      end;
  readln(s);
  n:=length(s);
  fillchar(a,sizeof(a),0);
  for i:=1 to n do
    for j:=i+1 to n+1 do
      if check(Copy(s,i,j-i)) then a[i,j] := 1;
  for k:=1 to n do
   for i:=1 to n do
    for j:=1 to n+1 do
      if (a[i,k]=1)and(a[k,j]=1) then a[i,j]:=1;
  if a[1,n+1]=1 then writeln('YES') else writeln('NO');
end.
