use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).unwrap(); let s = s.split_whitespace(); let a = s .filter(|s| s.len() == 1 || &s[..1] != "0") .flat_map(str::parse::) .filter(|&x| x < 12346) .count() == 2; println!("{}", if a { "OK" } else { "NG" }) }