import java.util.Scanner; public class Narabikae { public static void main(String[] args) { Scanner s = new Scanner(System.in); char[] A = s.nextLine().toCharArray(); String B = s.nextLine(); s.close(); int n = 0; for(char c : A){ if(B.indexOf(c) >= 0){ n++; } } if(n == B.length()){ System.out.println("YES"); }else{ System.out.println("NO"); } } }