#include #include #include #include //#define PI M_PI #include #define pc_u putchar using namespace std; using ll=long long; #pragma GCC target ("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #define rep(i,a,b) for(it i=(it)(a);i<=(it)b;i++) #define irep(i,a,b) for(int i=(int)(a);i<=(int)b;i++) #define irep2(i,a,b,c) for(int i=(int)(a);i<=(int)b;i+=c) #define nrep(i,a,b) for(it i=(it)(a);i>=(it)b;i--) #define inrep(i,a,b) for(int i=(int)(a);i>=(int)b;i--) #define inrep2(i,a,b,c) for(int i=(int)(a);i>=(int)b;i-=c) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define moda 998244353LL #define modb 1000000007LL #define modc 968244353LL #define dai 2500000000000000000LL #define sho -dai #define aoi 1e+18 #define tyu 2500000000 #define giri 1000000001 #define en 3.14159265358979 #define eps 1e-14 #define fi(x) cout< using pq = priority_queue; template using pqg = priority_queue, greater>; template using pairs = pair; using it=long long; using itn=int; using un=unsigned long long; using idb=double; using db=long double; using st=string; using ch=char; using bo=bool; using P=pair; using ip=pair; using vi=vector; using ivi=vector; using ivd=vector; using vd=vector; using vs=vector; using vc=vector; using vb=vector; using vp=vector

; using ivp=vector; using sp=set

; using isp=set; using ss=set; using sca=set; using si=set; using isi=set; using svi=set; using vvi=vector; using ivvi=vector; using ivvd=vector; using vvd=vector; using vvs=vector; using vvb=vector; using vvc=vector; using vvp=vector; using ivvp=vector; using vsi=vector; using ivsi=vector; using vsp=vector; using ivsp=vector; using vvsi=vector; using ivvsi=vector; using vvsp=vector; using ivvsp=vector; using vvvi=vector; using ivvvi=vector; using ivvvd=vector; using vvvd=vector; using vvvb=vector; using ivvvp=vector; using vvvvi=vector; using ivvvvi=vector; using vvvvd=vector; using ivvvvvi=vector; using ivvvvvvi=vector; using ivvvvvvvi=vector; const int dx[8]={0,1,0,-1,1,1,-1,-1}; const int dy[8]={1,0,-1,0,1,-1,1,-1}; st abc="abcdefghijklmnopqrstuvwxyz"; st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; st num="0123456789"; st mb="xo"; st MB="XO"; #include using namespace atcoder; using mints=modint998244353; using mint=modint; using minto=modint1000000007; using vm=vector; using vms=vector; using vmo=vector; using vvm=vector; using vvms=vector; using vvmo=vector; using vvvm=vector; using vvvms=vector; using vvvmo=vector; using vvvvm=vector; using vvvvms=vector; using vvvvmo=vector; using vvvvvm=vector; using vvvvvms=vector; using vvvvvmo=vector; using vvvvvvm=vector; using vvvvvvms=vector; using vvvvvvmo=vector; #define _UNIX03_SOURCE #include int putchar(int c); struct Scanner { char *buf; ssize_t wt, rd; size_t maxsz; public: Scanner(int size = 1<<12): maxsz(size) { buf = (char*)malloc(sizeof(char) * size); _read(); } std::string read_str() { int ch = _chr(); while (isspace(ch)) ch = nxchar(); int rd_first = rd; std::string res; while (rd <= wt && !isspace(buf[rd])) { ++rd; if (rd == wt) { res += std::string(buf, rd_first, wt - rd_first); _read(); rd_first = 0; } } res += std::string(buf, rd_first, rd - rd_first); return res; } char read_chr() { int ch = _chr(); while (isspace(ch)) ch = nxchar(); return ch; } template T read_int() { T ret = 0; bool s = true; int ch = _chr(); while (isspace(ch)) ch = nxchar(); if (ch == '-') { s = false; ch = nxchar(); } for (; isdigit(ch); ch = nxchar()) ret = ret * 10 + ch - '0'; return (s ? ret : -ret); } template T read_flt() { return stold(read_str()); } std::string read_line() { int ch = _chr(); while (isspace(ch)) ch = nxchar(); int rd_first = rd; std::string res; while (rd <= wt && buf[rd] != '\n') { ++rd; if (rd == wt) { res += std::string(buf, rd_first, wt - rd_first); _read(); rd_first = 0; } } res += std::string(buf, rd_first, rd - rd_first); return res; } private: void _read() { ssize_t r = read(0, buf, maxsz); if (r < 0) { throw std::runtime_error(strerror(errno)); } wt = r; rd = 0; } inline int nxchar() { ++rd; if (rd == wt) _read(); return _chr(); } inline int _chr() { return rd == wt ? EOF : buf[rd]; } } sc; inline short Short() { return sc.read_int(); } inline unsigned short UShort() { return sc.read_int(); } inline int Int() { return sc.read_int(); } inline unsigned int UInt() { return sc.read_int(); } inline long Long() { return sc.read_int(); } inline unsigned long ULong() { return sc.read_int(); } inline long long LLong() { return sc.read_int(); } inline unsigned long long ULLong() { return sc.read_int(); } inline __int128_t Int7() { return sc.read_int<__int128_t>(); } inline __uint128_t UInt7() { return sc.read_int<__uint128_t>(); } inline float Float() { return sc.read_flt(); } inline double Double() { return sc.read_flt(); } inline long double LDouble() { return sc.read_flt(); } inline std::string String() { return sc.read_str(); } inline char Char() { return sc.read_chr(); } inline bool Bool() { return sc.read_chr() == '1'; } inline void _SingleInput(short &n) { n = Short(); } inline void _SingleInput(unsigned short &n) { n = UShort(); } inline void _SingleInput(int &n) { n = Int(); } inline void _SingleInput(unsigned int &n) { n = UInt(); } inline void _SingleInput(long &n) { n = Long(); } inline void _SingleInput(unsigned long &n) { n = ULong(); } inline void _SingleInput(long long &n) { n = LLong(); } inline void _SingleInput(unsigned long long &n) { n = ULLong(); } inline void _SingleInput(__int128_t &n) { n = Int7(); } inline void _SingleInput(__uint128_t &n) { n = UInt7(); } inline void _SingleInput(float &d) { d = Float(); } inline void _SingleInput(double &d) { d = Double(); } inline void _SingleInput(long double &d) { d = LDouble(); } inline void _SingleInput(std::string &s) { s = String(); } inline void _SingleInput(char &c) { c = Char(); } inline void _SingleInput(bool &b) { b = Bool(); } template inline void _SingleInput(std::pair &p) { _SingleInput(p.first); _SingleInput(p.second); } template inline void _SingleInput(std::vector &v) { for (T &x: v) _SingleInput(x); } void input() { } template void input(T1& t1, T2&... t2) { _SingleInput(t1); input(t2...); } template inline void print_int(T n) { if (n < 0) { pc_u('-'); n = -n; } if (n < 10) { pc_u('0' + n); return; } int i; char b[21]; b[20] = 0; for (i = 20; n > 0; b[--i] = '0' + n % 10, n /= 10); fputs(b + i, stdout); } template void print_bigint(T n) { if (n < 0) { pc_u('-'); n = -n; } if (n < 10) { pc_u('0' + n); return; } int i; char b[41]; b[40] = 0; for (i = 40; n > 0; b[--i] = '0' + n % 10, n /= 10); fputs(b + i, stdout); } void print_char(char c) { pc_u(c); } void print_string(std::string s) { for (char &c: s) { pc_u(c); } } template void print_double(T d) { print_string(std::to_string(d)); } inline void _SingleOutput(short n) { print_int(n); } inline void _SingleOutput(unsigned short n) { print_int(n); } inline void _SingleOutput(int n) { print_int(n); } inline void _SingleOutput(unsigned int n) { print_int(n); } inline void _SingleOutput(long n) { print_int(n); } inline void _SingleOutput(unsigned long n) { print_int(n); } inline void _SingleOutput(long long n) { print_int(n); } inline void _SingleOutput(unsigned long long n) { print_int(n); } inline void _SingleOutput(__int128_t n) { print_bigint<__int128_t>(n); } inline void _SingleOutput(__uint128_t n) { print_bigint<__uint128_t>(n); } inline void _SingleOutput(float d) { print_double(d); } inline void _SingleOutput(double d) { print_double(d); } inline void _SingleOutput(long double d) { print_double(d); } inline void _SingleOutput(std::string s) { print_string(s); } inline void _SingleOutput(char c) { pc_u(c); } inline void _SingleOutput(bool b) { pc_u(b ? '1' : '0'); } template inline void _SingleOutput(std::pair p) { _SingleOutput(p.first); pc_u(' '); _SingleOutput(p.second); } template inline void _SingleOutput(std::vector v) { for (int i = 0; i < v.size() - 1; i++) { _SingleOutput(v[i]); pc_u(' '); } _SingleOutput(v.back()); } void print() { pc_u('\n'); } template void print(T1 t1, T2... t2) { _SingleOutput(t1); print(t2...); } template void dec(vector &a){ rep(i,0,a.size()-1)a[i]--; return; } template T gcda(T a,T b){ if(!a||!b)return max(a,b); while(a%b&&b%a){ if(a>b)a%=b; else b%=a; } return min(a,b); } it lcma(it a,it b){ return a/gcda(a,b)*b; } bo outc(int h,int w,int x,int y){ return (x<0||x>=h||y<0||y>=w); } void yn(bo a){print((a?string("Yes"):string("No")));} void YN(bo a){print((a?string("YES"):string("NO")));} /*総和をもとめるセグ木 struct nod{ it val; nod(it v=0):val(v){} }; nod op(nod a,nod b){return nod(a.val+b.val);} nod e(){return nod(0);} struct act{ it a; act(it e=0):a(e){} }; nod mapping(act f,nod x){return nod(f.a+x.val);} act comp(act f,act g){return act(f.a+g.a);} act id(){return act(0);}*/ //#define endl '\n' //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); st s;input(s); if(s=="1"){ print(0); yn(0); return 0; } if(s=="2"){ print(1); yn(1); return 0; } if(s=="3"){ print(1); yn(0); return 0; } if((s[s.size()-1]-'0')%2==0)print(0),yn(0); else print(1),yn(0); }