/* -*- coding: utf-8 -*- * * 446.cc: No.446 ゆきこーだーの雨と雪 (1) - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ int s2num(string &s) { int n = 0; for (int i = 0; i < s.size(); i++) { if (s[i] < '0' || s[i] > '9') return -1; n = 10 * n + s[i] - '0'; } return n; } /* main */ int main() { string sa, sb; cin >> sa >> sb; int a = s2num(sa), b = s2num(sb); if (a >= 0 && a <= 12345 && b >= 0 && b <= 12345) puts("OK"); else puts("NG"); return 0; }