#pragma GCC optimize ("Ofast") #include using namespace std; void *wmem; char memarr[96000000]; template inline void walloc1d(T **arr, int x, void **mem = &wmem){ static int skip[16] = {0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; (*mem) = (void*)( ((char*)(*mem)) + skip[((unsigned long long)(*mem)) & 15] ); (*arr)=(T*)(*mem); (*mem)=((*arr)+x); } template void sortA_L(int N, T1 a[], void *mem = wmem){ sort(a, a+N); } inline void rd(int &x){ int k; int m=0; x=0; for(;;){ k = getchar_unlocked(); if(k=='-'){ m=1; break; } if('0'<=k&&k<='9'){ x=k-'0'; break; } } for(;;){ k = getchar_unlocked(); if(k<'0'||k>'9'){ break; } x=x*10+k-'0'; } if(m){ x=-x; } } inline void wt_L(char a){ putchar_unlocked(a); } inline void wt_L(const char c[]){ int i=0; for(i=0;c[i]!='\0';i++){ putchar_unlocked(c[i]); } } int A[4]; int main(){ int i; wmem = memarr; { int Lj4PdHRW; for(Lj4PdHRW=(0);Lj4PdHRW<(4);Lj4PdHRW++){ rd(A[Lj4PdHRW]); } } sortA_L(4,A); for(i=(0);i<(4);i++){ if(A[i]!=A[0]+i){ wt_L("No"); wt_L('\n'); return 0; } } wt_L("Yes"); wt_L('\n'); return 0; } // cLay varsion 20200227-1 // --- original code --- // int A[4]; // { // rd(A(4)); // sortA(4,A); // rep(i,4) if(A[i]!=A[0]+i) wt("No"), return 0; // wt("Yes"); // }