P,Q=map(float,input().split()) A=P-1 B=P*Q-P print("YNEOS"[A