#include #include #include #include #include using namespace std; int extgcd(int a, int b, int&x, int& y){ int d=a; if(b!=0){ d=extgcd(b,a%b,y,x); y-=(a/b)*x; }else{ x=1; y=0; } return d; } char S[10010]; int main(){ int64_t X,Y,Z,x,y; cin>>X>>Y>>Z; if(X&&Y&&Z){ for(x=-5000;x<=5000;x++){ if((Z-x*X)%Y) continue; y=(Z-x*X)/Y; if(2*abs(x)+2*abs(y)-1<=10000) break; } if(x==5001){ cout<<"mourennaihasimasenn"<