#include using namespace std; #define int long long typedef long long ll; typedef pairpint; typedef vectorvint; typedef vectorvpint; #define pb push_back #define mp make_pair #define fi first #define se second #define ln <void chmin(T &t,U f){if(t>f)t=f;} templatevoid chmax(T &t,U f){if(t>=1; } return ret; } signed main(){ cin>>S>>T; int n=get(S,mod); int m=get(T,mod-1); if(n==0&&m==0){ cout<<0<