#include<stdio.h>
 
int main(void){
 char s[11];
  char t[11];
 scanf("%s",s);
 scanf("%s",t);
  int sizes =sizeof(s)/sizeof(int);
  int sizet = sizeof(t)/sizeof(int);
if(sizes==sizet){
printf("YES\n");
}else{"NO\n"}
return 0;
}