#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define ff first
#define ss second
int main(void){
    // Your code here!
 ios_base::sync_with_stdio(false);
 cin.tie(NULL);
 int a,b;
 cin >> a >> b;
 cout << (abs(a-b)<3 ? "Yes" : "No");
 return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for(inti=a;i<=b;i++)

#define MOD 1000000007
typedef long long int ll;
typedef vector<int>vi;
typedef pair<int,int>pi;

int sum(int a)
{
    int ans =0;
    while(a)
    {
        ans+=a%10;
        a/=10;
    }
    return ans;
}
int main(){
   std::ios::sync_with_stdio(false);
   cin.tie(0);

 int a,b;
 cin>>a>>b;

 cout<<max(sum(a),sum(b))<<endl;
return 0;
}
