#include <bits/stdc++.h>
#define rep(i,l,r) for(int i=(l); i<(r); ++i)
using ll = long long int;
using namespace std;
const int INF = 1234567890;
 
int main(){
    //入力
    int x, y;
    cin >> x >> y;
 
    //処理
    if(x>y) cout << (x<y+3?"Yes":"No") << endl;
    else cout << (x+3>y?"Yes":"No") << endl;
 
    //出力
    
    return 0;
}
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
void solve(){
    int a,b;
    cin>>a>>b;
    if(a==b){
        cout<<a<<endl;
    }else{
        cout<<3-a-b<<endl;
    }
    return;
}
int main() {
    int test =1;
    // cin>>test;
    while(test--){
        solve();
    }
    return 0;
}