#include #include #include #include #include #include //以下cout時の色設定 #define COUTRESET "\033[0m" // 色をリセット #define COUTRED "\033[31m" // 赤色 #define COUTGREEN "\033[32m" // 緑色 #define COUTYELLOW "\033[33m" // 黄色 #define COUTBLUE "\033[34m" // 青色 using namespace std; using namespace atcoder; using ll=long long; using ull=unsigned long long; using ld=long double; using mint=modint998244353; using mint2=modint1000000007; //任意modint using mint3=static_modint<1000000000>; //using P=pair; const ll INF=1e17; const vector dx={0,0,1,-1,1,1,-1,-1}; const vector dy={1,-1,0,0,1,-1,-1,1}; #define rep(i,N) for(int i=0;i ostream& operator<<(ostream &os,pair &pai){ return os<<"("< ostream& operator<<(ostream &os,vector vec){ for(auto val:vec){ os< istream& operator>>(istream &is,vector &vec){ for(int i=0;i<(int)vec.size();i++){ is>>vec[i]; } return is; } template istream& operator>>(istream &is,pair &pai){ is>>pai.first>>pai.second; return is; } template void print(const T &vec){ int i=0; for(auto val:vec){ cout< void print2(const vector> &vec){ int i=0; for(auto v:vec){ cout< void chmin(T &a,T b){ if(a>b){ a=b; } return; } template void chmax(T &a,T b){ if(async_with_stdio(0); ll Gx,Gy; cin>>Gx>>Gy; if(Gx==0 && Gy==0){ cout<<0; return 0; }else if(Gx==0 || Gy==0){ cout<<1; return 0; } if(Gx==Gy){ cout<<1; return 0; } if(-1*Gx==Gy){ cout<<1; return 0; } cout<<2; }