#include using namespace std; int main() { long long A, B; cin >> A >> B; const long long MOD = 1000000000 + 7; auto power = [&]( long long x, long long n ) { long long res = 1; while( n > 0 ) { if( n % 2 ) res = res * x % MOD; x = x * x % MOD; n /= 2; } return res; }; long long a = power( A, B ); long long b = power( B, A ); string ans = "No"; if( a == b ) ans = "Yes"; cout << ans << endl; }