#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const double pi=4*atan(1.0); constexpr long long mod=static_cast(1e9+7); using cWeightEdges=vector>>; using cEdges=vector>; int main(){ string A,B; cin>>A>>B; bool ans=true; for(const auto& val:A){ if(!('0' <= val && val <= '9')){ ans=false; break; } } if(ans){ for(const auto& val:B){ if(!('0' <= val && val <= '9')){ ans=false; break; } } } if(ans){ bool is_zero_leading=false; if(A.size()>1 && (A[0] == '0')){ is_zero_leading=true; } if(B.size()>1 && (B[0] == '0')){ is_zero_leading=true; } if(is_zero_leading)ans=false; } if(ans){ stringstream sstream; sstream<>x; if(!(0<=x && x<=12345))ans=false; } if(ans){ stringstream sstream; sstream<>x; if(!(0<=x && x<=12345))ans=false; } if(ans)cout<<"OK"<