#include<bits/stdc++.h>
using namespace std;
int k,x;
bool search(int y)
{if(y>x)return 0;
if(x==y)return 1;
if(x>y)return search(2*y+1)||search(3*y+1);
}
int main()
{scanf("%d,%d",&k,&x);
if(search(k))cout<<"YES";
else cout<<"NO";
return 0;
}
判断元素是否存在
于 2018-02-27 21:19:38 首次发布