#include <bits/stdc++.h>
using namespace std;
#define ll long long 
const int mod = 1e9 + 7;
//1.takes nothing returns nothing
//2.takes nothing returns something
//3.takes something returns something
//4.takes something returns nothing
int digi(ll n){
    ll f=0;
    while(n>0){
        n/=10;f++;
    }
    return f;
}
bool isPrime(int n)
{
    
    if (n <= 1)
        return false;
  
    
    for (int i = 2; i < n; i++)
        if (n % i == 0)
             return false;
  
    return true;
}

ll Sum(string s)
{
    ll count=0;
    for(ll i=0;i<(s.size()-1);i++)
    {
        if(s[i]==s[i+1])
        count += 2;
        else
        count += 1;
    }
    return count;
}
ll SieveOfEratosthenes(ll n)
{
   
    bool prime[n + 1];
    memset(prime, true, sizeof(prime));
 
    for (ll p = 2; p * p <= n; p++)
    {
        // If prime[p] is not changed,
        // then it is a prime
        if (prime[p] == true)
        {
            for (int i = p * p; i <= n; i += p)
                prime[i] = false;
        }
    }
    ll f=1;
    for (int p = 2; p <= n; p++){
        if (prime[p]==true && p*2>n){
            f++;//cout<<p<<" ";
            }
        
    }
    return f;
}
void print(int n){
   ll i=0,sum=0;
    for(i=0;i<n;i++){
   
        sum+=i;
    }
    cout<<sum<<" ";
}
//function declaration
//function defining
//function calling
int main() {
    ll t;t=1;
    while(t--){
    ll n,m,i,f=0;cin>>n>>m;ll a[n+5];
   if(n==m)
   cout<<n<<endl;
   else if(n==1&&m==2)
    cout<<"0"<<endl;
     else if(n==0&&m==1)
    cout<<"2"<<endl;
     else if(n==2&&m==1)
    cout<<"0"<<endl;
     else if(n==1&&m==0)
    cout<<"2"<<endl;
     else if(n==0&&m==2)
    cout<<"1"<<endl;
     else if(n==2&&m==0)
    cout<<"1"<<endl;
    
    }
}
#include<bits/stdc++.h>
#define ll long long int
#define ld long  double
using namespace std;
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define endl "\n"
#define maxpq priority_queue<ll>
#define minpq priority_queue<ll, vector<ll>, greater<ll> >
#define vi vector<ll>
#define pii pair<ll, ll>
#define vii vector<pii>
#define for0(i, n) for (int i = 0; i < n; i++)
#define for1(i, n) for (int i = 1; i <= n; i++)
#define loop(i,a,b) for (int i = a; i < b; i++)
#define bloop(i,a,b) for (int i = a ; i>=b;i--)

#define INT_MAXI 9000000000000000000
#define INT_MINI -9000000000000000000

ll max(ll a, ll b) {if (a > b) return a; else return b;}
ll min(ll a, ll b) {if (a < b) return a; else return b;}

const int dx[4] = { -1, 1, 0, 0};
const int dy[4] = {0, 0, -1, 1};
int XX[] = { -1, -1, -1, 0, 0, 1, 1, 1 };
int YY[] = { -1, 0, 1, -1, 1, -1, 0, 1 };




  
int main()
{
    
	fio;
    ll t,i,j,u,v,n,m,x,k,p,c,y;
    cin>>x>>y;
    ll mini=min(x,y),maxi=max(x,y);
    if(mini+3>maxi)
    {
    	cout<<"Yes";
	}
	else
	cout<<"No";
   
    
  
}