#!/usr/bin/python
import sys

N = 655076673443707551099143071618051666714277042558983269995765119

def correct():
  print("OK")
  sys.exit(0)

def wrong_answer():
  print("Wrong answer")
  sys.exit(1)

x = int(sys.stdin.readline())

if x<=1: correct()
if x>=N: correct()
if (x*x-1) % N != 0: correct()

wrong_answer()
