欧拉可得
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 19260817;
int read() {
int res = 0, ch = getchar();
while(!isdigit(ch)) ch = getchar();
while(isdigit(ch)) {
res = (res << 3) + (res << 1) + (ch - '0');
res %= mod;
ch = getchar();
}
return res;
}
int x, y;
void exgcd(int a, int b) {
if (b == 0) {
x = 1, y = 0;
return;
}
exgcd(b, a % b);
int _ = x;
x = y;
y = _ - a / b * y;
}
signed main(){
int a = read(), b = read();
if (b == 0) return cout << "Angry!", 0;
exgcd(b, mod);
x = (x % mod + mod) % mod;
printf("%lld\n", a * x % mod);
}