n1 = input() n2 = input() n1_len = len(n1) n2_len = len(n2) if n1_len >= 8 and "123" not in n1 and n1 == n2: print("OK") elif n1_len < 8: print("Короткий!") elif "123" in n1: print("Простой") else: print("Различаются.")