#include #include #include using namespace std; #define int long long #define rep(i,n) for(int i = 0; i < n; i++) #define INF (long long)(1e18) #define MOD (int)(1e9+7) #define min(a,b) (a>b?b:a) #define max(a,b) (a>b?a:b) #define yn(f) (f?"Yes":"No") #define YN(f) (f?"YES":"NO") #define pro "はいプロ 世界一○○が上手 ○○界のtourist ○○時代の終焉を告げる者 実質○○ ○○するために生まれてきた男" #define Answer_to_the_Ultimate_Question_of_Life_the_Universe_and_Everything 42 int mod = 6; long long power(long long x, long long n){ long long ans = 1; if(n==0) n = mod; while(n){ if(n&1) ans *= x; n >>= 1; x *= x; x %= mod; ans%=mod; } return ans%mod; } signed main(){ int x[] = {2,8,5,7,1,4}; string n, k; int nsize, ksize; int N = 0, K = 0; cin>>n>>k; nsize = n.size(); ksize = k.size(); for(int i = 0; i < nsize; i++, N%=6) N = N*10+(n[i]-'0')%6; for(int i = 0; i < ksize; i++, K%=6) K = K*10+(k[i]-'0')%6; cout<