import math
p=10**9+7
n=int(input())
k=int(math.log2(n))
f=[[n//(2**i*3**j) for j in range(3)] for i in range(k+1)]
old=[[0,0,0] for i in range(k+1)]
old[k][0]=1
if n>=3*2**(k-1):
    old[k-1][1]=1
m=n//2+2
for i in range(2,m):
    dp=[[0,0,0] for i in range(k+1)]
    for j in range(k):
        for l in range(2):
            dp[j][l]=(old[j][l]*(f[j][l]-i+1)+old[j+1][l]*(f[j][l]-f[j+1][l])+old[j][l+1]*(f[j][l]-f[j][l+1]))%p
    old=dp
curr=old[0][0]
for i in range(1,n-m+2):
    curr*=i
    curr%=p
print(curr)

import sys
range = xrange
input = raw_input

MOD = 10**9 + 7
def fac(x):
    i = 1
    for j in range(2 , x + 1):
        i = i * j % MOD
    return i

fac = [1]
for i in range(1, 10**6 + 10):
    fac.append(int(fac[-1] * i % MOD))

n = int(input())
def ways(prevg, g):
    cur = n//g - n//prevg if prevg else n//g
    left = n - n//g

    a = cur
    for i in range(left + 1, left + cur):
        a = a * i % MOD
    #a = fac[cur] * pow(left+1, cur - 1, MOD)
    b = +(g == 1)
    for x in 2,3:
        if g % x == 0:
            b += ways(g, g // x)
    return a * b

a = 1
while a * 2 <= n:
    a *= 2

ans = ways(0, a)
if a //2 * 3 <= n:
    ans += ways(0, a //2 * 3)

print ans % MOD

def perm(a,b):
    ret = 1
    for i in range(a, a - b, -1):
        ret = (ret * i)%1000000007
    return ret

num = int(input())
num2 = num
c = 0
while num2:
    c += 1
    num2 >>= 1
pow2 = 1 << (c-1)
array = [pow2]
for i in range(c-1):
    array.append(array[-1]>>1)

def calc(arr):
    data = []
    #sm = 0
    av = num
    for i in range(c):
        data.append((num // arr[i] - (num - av), av))
        av -= data[-1][0]

    #print(data)

    ans = 1
    for d in data:
        ans = (ans * (d[0] * perm(d[1] - 1, d[0] - 1)))%1000000007
    return ans

answer = calc(array)

if num >= pow2 // 2 * 3:
    for i in range(1,c):
        dat = [1]
        for j in range(1, c):
            if j == i:
                dat = [3*dat[0]] + dat
            else:
                dat = [2*dat[0]] + dat
        #print(dat)
        a = calc(dat)
        answer += a

print(answer%1000000007)

def binpow(x, t, mod):
    if t == 0:
        return 1
    if t % 2 == 0:
        return binpow(x * x % mod, t//2, mod)
    return binpow(x, t-1, mod) * x % mod

def calc(a, f, rv, n):
    mod = 10 ** 9 + 7
    s = 0
    ans = 1
    for i in range(len(a)-1, -1, -1):
        cur = n//a[i]
        if i > 0:
            cur -= n//a[i-1]
        t = cur-1
        s += t
        ans = ans * cur * f[s] * rv[s-t] % mod
        #print(a[i], cur, s, f[s], rv[s-t])
        s += 1
    return ans
n = int(input())
x = n
c = 0
while x > 1:
    x //= 2
    c+=1
f = [1] * 1000100
mod = 10**9 + 7
for i in range(1, len(f)):
    f[i] = f[i-1] * i % mod
rv = [1] * 1000100
rv[-1] = binpow(f[-1], mod-2, mod)
for i in range(len(f)-2, 0, -1):
    rv[i] = rv[i+1] * (i+1) % mod
a = []
for i in range(c, -1, -1):
    a.append(2**i)
ans=calc(a, f, rv, n)
if (2**(c-1)) * 3 <= n:
    c -= 1
    a = []
    while c >= 0:
        a.append((2**c) * 3)
        b = a.copy()
        for i in range(c, -1, -1):
            b.append(2**i)
        ans = (ans + calc(b, f, rv, n)) % mod
        c -= 1
print(ans)

p=10**9+7
import math
def r(l):
    x=1
    for m in l:
        x=x*m%p
    return x
n=int(input())
a,k,x,t=[],int(math.log2(n)),n,0
while x>0:
    a.append(x-x//2)
    x//=2
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
y=r([i for i in range(2,n+1)])
s=k if n<3*2**(k-1) else 0
for j in range(s,k+1):
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    x=y*r(e)%p
    f=r([sum(e[:i+1]) for i in range(k+1)])
    while f>1:
        x*=p//f+1
        f=f*(p//f+1)%p
    t+=x%p
print(t%p)

p=10**9+7
import math
def prod(l):
    x=1
    for m in l:
        x=x*m%p
    return x
n=int(input())
a,k,x,t=[],int(math.log2(n)),n,0
while x>0:
    a.append(x-x//2)
    x//=2
c=[sum(a[i:]) for i in range(k+1)]
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
y=prod([i for i in range(2,n+1)])
s=k if n<3*(2**(k-1)) else 0
for j in range(s,k+1):
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    x=(y*prod(e))%p
    f=prod([sum(e[:i+1]) for i in range(k+1)])
    while f>1:
        x*=p//f+1
        f=(f*(p//f+1))%p
    t+=x%p
print(t%p)

p=10**9+7
import math
def r(l):
    x=1
    for m in l:
        x=x*m%p
    return x
n=int(input())
a,k,x,t=[],int(math.log2(n)),n,0
while x>0:
    a.append(x-x//2)
    x//=2
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
y=r(i for i in range(2,n+1))
s=k if n<3*2**(k-1) else 0
for j in range(s,k+1):
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    x=y*r(e)%p
    f=r(sum(e[:i+1]) for i in range(k+1))
    while f>1:
        x*=p//f+1
        f=f*(p//f+1)%p
    t+=x%p
print(t%p)

p=10**9+7
import math
def prod(l):
    x=1
    for m in l:
        x*=m
    return x
n=int(input())
a=[]
k=int(math.log2(n))
x=n
while x>0:
    y=x//2
    a.append(x-y)
    x=y
c=[sum(a[i:]) for i in range(k+1)]
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
facs=[1]*(n+1)
for i in range(2,n+1):
    facs[i]=(i*facs[i-1])%p
start=k if n<3*(2**(k-1)) else 0
tot=0
for j in range(start,k+1):
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    x=(facs[n]*prod(e))%p
    f=prod([sum(e[:i+1]) for i in range(k+1)])
    while f>1:
        x*=p//f+1
        f=(f*(p//f+1))%p
    tot+=x%p
print(tot%p)

p=10**9+7
import math
def inv(k,p):
    prod=1
    while k>1:
        prod*=(p//k+1)
        k=(k*(p//k+1))%p
    return prod%p
n=int(input())
a=[]
k=int(math.log2(n))
x=n
while x>0:
    y=x//2
    a.append(x-y)
    x=y
c=[sum(a[i:]) for i in range(k+1)]
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
facs=[1]*(n+1)
for i in range(2,n+1):
    facs[i]=(i*facs[i-1])%p
if n<3*(2**(k-1)):
    start=k
else:
    start=0
tot=0
for j in range(start,k+1):
    prod=1
    for i in range(j,k):
        prod*=b[i]
    prod*=d[j]
    for i in range(j):
        prod*=a[i]
    prod%=p
    prod*=facs[n]
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    f=[sum(e[:i+1]) for i in range(k+1)]
    g=1
    for guy in f:
        g*=guy
    prod*=inv(g,p)
    prod%=p
    tot+=prod
print(tot%p)

import sys
range = xrange
input = raw_input

MOD = 10**9 + 7
def fac(x):
    i = 1
    for j in range(2 , x + 1):
        i = i * j % MOD
    return i

n = int(input())
def ways(prevg, g):
    cur = n//g - n//prevg if prevg else n//g
    left = n - n//g

    a = fac(cur) * pow(left+1, cur - 1, MOD)
    b = +(g == 1)
    for x in 2,3:
        if g % x == 0:
            b += ways(g, g // x)
    return a * b

a = 1
while a * 2 <= n:
    a *= 2

ans = ways(0, a)
if a //2 * 3 <= n:
    ans += ways(0, a //2 * 3)

print ans % MOD

p=10**9+7
import math
def inv(k,p):
    prod=1
    while k>1:
        prod*=(p//k+1)
        k=(k*(p//k+1))%p
    return prod%p
n=int(input())
a=[]
k=int(math.log2(n))
x=n
while x>0:
    y=x//2
    a.append(x-y)
    x=y
c=[sum(a[i:]) for i in range(k+1)]
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
facs=[1]*(n+1)
for i in range(2,n+1):
    facs[i]=(i*facs[i-1])%p
if n<3*(2**(k-1)):
    start=k
else:
    start=0
tot=0
for j in range(start,k+1):
    prod=1
    for i in range(j,k):
        prod*=b[i]
    prod*=d[j]
    for i in range(j):
        prod*=a[i]
    prod%=p
    prod*=facs[n]
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    f=[sum(e[:i+1]) for i in range(k+1)]
    g=1
    for guy in f:
        g*=guy
    prod*=inv(g,p)
    prod%=p
    tot+=prod
print(prod)

p=10**9+7
import math
def inv(k,p):
    prod=1
    while k>1:
        prod*=(p//k+1)
        k=(k*(p//k+1))%p
    return prod%p
n=int(input())
a=[]
k=int(math.log2(n))
x=n
while x>0:
    y=x//2
    a.append(x-y)
    x=y
c=[sum(a[i:]) for i in range(k+1)]
b=[n//(3*2**i)-n//(6*2**i) for i in range(k+1)]
d=[n//2**i-n//(3*2**i) for i in range(k+1)]
facs=[1]*(n+1)
for i in range(2,n+1):
    facs[i]=(i*facs[i-1])%p
if n<3*(2**(k-1)):
    start=k
else:
    start=0
tot=0
for j in range(start,k+1):
    prod=1
    for i in range(j,k):
        prod*=b[i]
    prod*=d[j]
    for i in range(j):
        prod*=a[i]
    prod%=p
    prod*=facs[n]
    e=[a[i] for i in range(j)]+[d[j]]+[b[i] for i in range(j,k)]
    f=[sum(e[:i+1]) for i in range(k+1)]
    g=1
    for guy in f:
        g*=guy
    prod*=inv(g,p)
    prod%=p
    tot+=prod
print(tot)


num = raw_input()
ans = [x for x in raw_input()]

na = sorted(num)
if na[0] == '0':
    for i, n in enumerate(na):
        if n != '0':
            na[0] = n
            na[i] = '0'
            break
if ans == na:
    print 'OK'
else:
    print 'WRONG_ANSWER'

s=[int(n) for n in input()]
z=[int(n) for n in input()]
if len(s)==len(z):
	s.sort()
	m=v=0
	if s[0]==0:
		for n in range(len(s)):
			if s[n]!=0:
				s[0]=s[n]
				s[n]=0
				break
	#print(s)
	for n in range(len(s)):
		m+=s[n]*10**(n)
	for n in range(len(z)):
		v+=z[n]*10**(n)
	if m==v:
		print('OK')
	else:
		print('WRONG_ANSWER')
else:
	print('WRONG_ANSWER')

a = input()
b = input()
c = ''.join(sorted(a))
if c[0] == '0':
    p = 0
    while p < len(c) and c[p] == '0':
        p += 1
    if p < len(c):
        c = list(c)
        c[0], c[p] = c[p], c[0]
        c = ''.join(c)

print('OK' if b == c else 'WRONG_ANSWER')

# -*- coding: utf-8 -*-

q,a = input(),input()
n = q.count('0')
x = sorted(list(map(int,str(q))))
x = [str(i) for i in x]
x = ''.join(x)
if len(q) > 1: k = str(x[n])+'0'*n+str(x[n+1:])
else: k = str(x[0])

if k == a: print('OK')
else: print('WRONG_ANSWER')

lst=input()
lst1=input()

lst=''.join(sorted(lst))
if(len(lst)>=2):
    if(lst[0]=='0'):
        temp=list(lst)
        temp[0]=temp[1]
        temp[1]='0'
        lst=''
        for i in temp:
            lst+=i
if(lst==lst1):
    print('OK')
else:
    print('WRONG_ANSWER')

n = raw_input()
ans = raw_input()
st = list(n)
st.sort()
min_val = '9'
min_idx = 0
for i in range(len(st)):
    s = st[i]
    if s < min_val and s != '0':
        min_val = s
        min_idx = i
st[0], st[min_idx] = st[min_idx], st[0]
myans = '%s'*len(st) % tuple(st)
print 'OK' if myans == ans else 'WRONG_ANSWER'

a = input()
b = input()
a = sorted(a)
c = ''
dict1 = {}
if(len(a)==1):
    c = ''.join(a)
else:
    for i in a:
        dict1[i] = a.count(i)
    if('0' not in a):
        c = ''.join(a)
    else:
        if('0' in dict1):
            for i in range(dict1['0']):
                a.remove('0')
            c = ''.join(min(a)+'0'*dict1['0']+''.join(a[1:]))
if(c == b):
    print('OK')
else:
    print('WRONG_ANSWER')

num1 = [int(i) for i in list(input())]
num2 = [int(i) for i in list(input())]

if set(num1) != set(num2) or len(num1) != len(num2): print("WRONG_ANSWER")
else:
    num1.sort()
    for i in range(len(num1)):
        if num1[i] != 0:
            num1[0], num1[i] = num1[i], num1[0]
            break
    if num1 == num2: print("OK")
    else: print("WRONG_ANSWER")

n = raw_input()
m = raw_input()
n = sorted(n)
s = ""
for i in n:
    if i != str(0):
        s += i
        n.remove(i)
        break
for i in n:
    s += i
if s == m:
    print "OK"
else:
    print "WRONG_ANSWER"

n=raw_input();m=raw_input();l=[];c=0;s=''
for i in n:
    if i=='0':  c+=1
    else:   l.append(i)
l.sort()
if len(l)<>0:   s+=l[0]
l=l[1:]
while c<>0:
    s+='0';c-=1
s+=''.join(l);
if s==m:    print"OK"
else:   print"WRONG_ANSWER"

a=input()
b=input()
a=list(a)
a.sort()

if a[0]=="0":
    for i in range(1,len(a)):
        if a[i]!=0:

            a[0]=a[i]
            a[i]="0"
            break
    a=''.join(a)
    if a==b:
        print("OK")
    else:
        print("WRONG_ANSWER")
else:
    a=''.join(a)
    if a==b:
        print("OK")
    else:
        print("WRONG_ANSWER")

r = lambda:raw_input(); a = sorted(list(r())); b = r()
if (a[0] == '0'):
    for i in xrange(1, len(a)):
        if (a[i] != '0'):
            rep = a[i]
            a[i] = '0'
            a[0] = rep
            break
print ['WRONG_ANSWER','OK'][(''.join(x for x in a)) == b]

t,s=raw_input(),raw_input()
t=''.join(sorted(t))
cnt=t.count('0')
if len(t)>cnt: t=t[cnt] + '0'*cnt + t[cnt+1:]
print "OK" if s==t else "WRONG_ANSWER"

import sys
n = input()
check = input()
if (len(n)!=len(check)):
	print('WRONG_ANSWER')
	sys.exit()
if (int(n) == 0):
	if int(check) == 0:
		print ('OK')
	else:
		print('WRONG_ANSWER')
	sys.exit()
wynik = ''
lista = []
for char in n:
	lista.append(int(char))
lista.sort()
liczba_zer = 0
mini = 9
while lista[liczba_zer] == 0:
	liczba_zer+=1;
wynik += str(lista[liczba_zer])
for i in range(liczba_zer):
	wynik += str(0)
for i in range(liczba_zer+1, len(lista)):
	wynik += str(lista[i])
#	print(wynik, check)
if wynik == check:
	print('OK')
else:
	print('WRONG_ANSWER')

def R(): return map(int, input().split())
def I(): return int(input())
def S(): return str(input())

def L(): return list(R())

from collections import Counter

import math
import sys

s=S()
s=sorted(s)
ans2=S()

cnt=Counter(s)

z=cnt['0']
s=''.join(s)

print(['WRONG_ANSWER','OK'][s[z:z+1]+'0'*z+s[z+1:]==ans2])

n = raw_input()
m = raw_input()
D = [0 for i in range(10)]

for i in n:
    D[int(i)] += 1
ans = ''
for j in range(1,10):
    if D[j] != 0:
        ans += str(j)
        D[j] -= 1
        break

for j in range(10):
    ans += D[j]*str(j)

if ans == m :
    print "OK"

else:
    print "WRONG_ANSWER"

import sys
n = sys.stdin.readline().strip();
m = sys.stdin.readline().strip();
n = ''.join(sorted(n))
if n[0] == '0':
	for i in range(len(n)):
		if n[i] != '0':
			break
	n = n[i]+n[:i]+n[i+1:]
if m==n:
	print "OK"
else:
	print "WRONG_ANSWER"

n = list(input())
ans = input()
n.sort()
i = n.count('0')
if i == len(n):
    if ''.join(ans) == n or ans == '0' and n == ['0']:
        print('OK')
    else:
        print('WRONG_ANSWER')
else:
  n = [x for x in n if x != '0']
  n = ''.join(n)
  new_s = n[0]
  for a in range(i):
    new_s += '0'
  new_s += n[1:]
  if new_s == ans:
      print('OK')
  else:
      print('WRONG_ANSWER')

from collections import Counter

s = input()
counter = Counter(s)
nozero = ''.join(s.split('0'))
correct = ''
if nozero:
    correct += min(nozero)
    counter[min(nozero)] -= 1
for i in range(10):
    c = chr(ord('0') + i)
    for j in range(counter[c]):
        correct += c
ans = input()
if correct == ans:
    print('OK')
else:
    print('WRONG_ANSWER')

r = raw_input()
a = raw_input()
r1 =''.join(sorted(r))
n = r1.count('0')
if r1[n:n+1]+'0'*n+r1[n+1:]==a:
	print 'OK'
else:
	print 'WRONG_ANSWER'

# -*- coding: UTF-8 -*-

# from itertools import *
# from collections import defaultdict

# def gcd(a,b):
#     while b > 0: a,b = b, a%b
#     return a

# def baseN(num,b,numerals="0123456789abcdefghijklmnopqrstuvwxyz"):
#     return ((num == 0) and  "0" ) or ( baseN(num // b, b).lstrip("0") + numerals[num % b])
a = raw_input()
zeros = a.count("0")
a = a.replace("0", "")
a = sorted(a)
if len(a) > 1:
    if a[0]+"0"*zeros+"".join(a[1:]) == raw_input():
        print "OK"
    else:
        print "WRONG_ANSWER"
else:
    if raw_input() == "".join(a)+("0"*zeros):
        print "OK"
    else:
        print "WRONG_ANSWER"

n=str(input())
m=input()
mi=n.replace('0','')
p=''
if len(mi)!=0:
    p=min(mi)
for i in range(0,len(n)):
    if n[i]==p and i!=len(n)-1:
        n=n[:i]+n[i+1:]
        break
    elif n[i]==p and i==len(n)-1:
        n=n[:-1]
while len(n)!=0:
    mi=min(n)
    p=p+mi
    for j in range(0,len(n)):
        if n[j]==mi and j!=len(n)-1:
            n=n[:j]+n[j+1:]
            break
        elif n[j]==mi and j==len(n)-1:
            n=n[:-1]
if p==m:
    print('OK')
else:
    print('WRONG_ANSWER')

#################################################################
# - Programming Credits - atifcppprogrammer
#################################################################
# Getting Problem Data from Codeforces.
numberOrg,numberMin = list(input()),input()
# For Storing Occurence of Digits (0-9) in numberOrg.
numString = ['0','1','2','3','4','5','6','7','8','9']
listCount = [0,0,0,0,0,0,0,0,0,0]
# Computing Counts.
for i in range(len(numberOrg)):
    digit = int(numberOrg[i])
    listCount[digit] = listCount[digit]+1
# Computing Minimum-Non Zero Occuring Digit.
index,found = 1,False
while not found and index<10:
    if listCount[index]>0:
        found = True
    else: index = index+1
# Deciding on minNonZero based on Search.
if not found: minNonZero = 0
else: minNonZero = index
# Computing Minimum Possible Number.
# Adding one minNonZero.
possMin = numString[minNonZero]
listCount[minNonZero] = listCount[minNonZero]-1
# Accounting For Zeros.
possMin+= numString[0]*listCount[0]
# Accounting for remaining minNonZero's.
possMin+= numString[minNonZero]*listCount[minNonZero]
# Accounting for digits greater than minNonZero's.
for i in range(minNonZero+1,10):
    possMin+=numString[i]*listCount[i]
# Verdict.
if possMin == numberMin:
    print("OK")
else: print("WRONG_ANSWER")
#################################################################

n = raw_input('')
m = raw_input('')

bl = 0

if m[0] != '0' and len(n) == len(m) and len(n) != 1:
    dl = len(n)

    sp = []

    for x in range(dl):
        sp.append(n[x])

    sp = [int(x) for x in sp]
    sp.sort()

    kol = sp.count(0)

    if kol != 0 and kol != dl:
        ch = sp[kol]
        sp[0] = ch
        sp[kol] = 0

    if kol != dl or len(m) == 1:
        sp = [str(x) for x in sp]

        pStr = ''
        pStr = pStr.join(sp)

        if pStr == m:
            bl = 1
            print 'OK'
elif len(n) == len(m):
    if n == m:
        bl = 1
        print 'OK'

if bl == 0:
    print 'WRONG_ANSWER'

d=raw_input()
x=raw_input()
m=''
res=''
result=''
for i in range(0,len(d)):
    m=m+" "+d[i:i+1]

m=m[1:len(m)]
m=m.split()
k=0
for i2 in range(0,len(m)):

    m[i2]=int(m[i2])
    if(m[i2]==0):
        k=k+1

m=sorted(m)
if(len(m)==1)&(m[0]==0):
    k=9
    res=0
for i in range(0,len(m)):
    m[i]=str(m[i])
if(k==1):
    res=m[1]+m[0]
    for i in range(2,len(m)):
        res=res+m[i]

if(k==2):
    res=m[2]+m[1]+m[0]
    for i in range(3,len(m)):
        res=res+m[i]
if(k==3):
    res=m[3]+m[2]+m[1]+m[0]
    for i in range(4,len(m)):
        res=res+m[i]
if(k==4):
    res=m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(5,len(m)):
        res=res+m[i]
if(k==5):
    res=m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(6,len(m)):
        res=res+m[i]
if(k==6):
    res=m[6]+m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(7,len(m)):
        res=res+m[i]
if(k==7):
    res=m[7]+m[6]+m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(8,len(m)):
        res=res+m[i]
if(k==8):
    res=res[8]+m[7]+m[6]+m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(9,len(m)):
        res=res+m[i]
if(k==0):
    for i in range(0,len(m)):
        res=res+m[i]

if(str(res)==str(x)):
    print("OK")
if(str(res)!=str(x)):
    print("WRONG_ANSWER")

def main():
    s = input()
    if s != "0":
        l = sorted(c for c in s if c != '0')
        l[0] += '0' * s.count('0')
        s = ''.join(l)
    print(("OK", "WRONG_ANSWER")[s != input()])

if __name__ == '__main__':
    main()

s = [int(ch) for ch in input()]
ss = [int(ch) for ch in input()]
if s==[0] and ss==[0]:
    print("OK")
    exit()
s.sort()
ans=[]
for i in range(len(s)):
    if s[i]!=0:
        ans.append(s[i])
        break
for j in range(i):
    ans.append(0)
for k in range(i+1,len(s)):
    ans.append(s[k])
#print(ans)
if ans==ss:
    print("OK")
else:
    print("WRONG_ANSWER")

n = input()
m = input()
if len(n) > 1:
    others = []
    z = []
    for i in n:
        if i == '0':
            z.append(i)
        else:
            others.append(i)
    others = sorted(others)

    n = others[0] + ''.join(z) + ''.join(others[1:])

print('OK' if n == m else 'WRONG_ANSWER')

a=list(input().strip())
b=input().strip()
a.sort()
for i in range(len(a)):
  if a[i]!='0':
    a[0],a[i]=a[i],a[0]
    break
if a==list(b):
  print("OK")
else:
  print("WRONG_ANSWER")

n = raw_input()
m = raw_input()
a = sorted(n)

if len(n) == 1:
    res = n == m
else:
    if a[0] == '0':
        i = 1
        while a[i] == '0':
            i += 1
        a[0], a[i] = a[i], a[0]
    res = m == ''.join(a)

if res:
    print 'OK'
else:
    print 'WRONG_ANSWER'

n, m, i = sorted(raw_input()), raw_input(), 0

while(i < len(n) and n[i] == '0'):
   i += 1

z = n[i: i + 1] + n[0:i]  + n[i + 1:]

if ''.join(z) == m:
   print "OK"
else:
   print "WRONG_ANSWER"

n = list(raw_input())
ans = raw_input()
n.sort()

def correctornot(ans,n):
    if len(n) == 1 and n[0] != ans:
        return "WRONG_ANSWER"
    elif len(n) == 1 and n[0] != ans:
        return "OK"
    elif len(n)>0:
        if n[0] == "0":
            for i in range(1,len(n)):
                if int(n[i]) > 0:
                    n[0],n[i] = n[i],n[0]
                    break
        n = "".join(n)
        if ans == n:
            return "OK"
        else:
            return "WRONG_ANSWER"

print correctornot(ans,n)

a = [0] * 10
for k in raw_input():
    a[int(k)] += 1
s = ""
for i in xrange(1, 10):
    if a[i] != 0:
        a[i] -= 1
        s += str(i)
        break
for i in xrange(10):
    s += str(i) * a[i]
if s == raw_input():
    print "OK"
else:
    print "WRONG_ANSWER"

n = raw_input('')
m = raw_input('')

bl = 0

if m[0] != '0' and len(n) == len(m) and len(n) != 1:
    dl = len(n)

    sp = []

    for x in range(dl):
        sp.append(n[x])

    sp = [int(x) for x in sp]
    sp.sort()

    kol = sp.count(0)

    if kol != 0 and kol != dl:
        ch = sp[kol]
        sp[0] = ch
        sp[kol] = 0

    if kol != dl or len(m) == 1:
        sp = [str(x) for x in sp]

        pStr = ''
        pStr = pStr.join(sp)

        if pStr == m:
            bl = 1
            print 'OK'
elif len(n) == len(m):
    if n == m:
        bl = 1
        print 'OK'
else:
    pass

if bl == 0:
    print 'WRONG_ANSWER'

n=input()
m=raw_input()
k=int(m)
a=map(int,str(n))
b=sorted(a)
count=0
for i in range(len(b)):
    if (b[i]==0):
        count=count+1
    else:
        break
if(len(b)>1):
    temp=b[0]
    b[0]=b[count]
    b[count]=temp

num = int(''.join(map(str,b)))

if ((num==k) & (len(b)==len(m))):
    print "OK"
else:
    print "WRONG_ANSWER"

n = raw_input('')
m = raw_input('')

dl = len(n)
bl = 0

if m[0] != '0' and dl == len(m) and dl != 1:
    sp = []

    for x in range(dl):
        sp.append(n[x])

    sp = [int(x) for x in sp]
    sp.sort()

    kol = sp.count(0)

    if kol != 0 and kol != dl:
        ch = sp[kol]
        sp[0] = ch
        sp[kol] = 0

    if kol != dl or len(m) == 1:
        sp = [str(x) for x in sp]

        pStr = ''
        pStr = pStr.join(sp)

        if pStr == m:
            bl = 1
            print 'OK'
elif dl == len(m):
    if n == m:
        bl = 1
        print 'OK'
else:
    pass

if bl == 0:
    print 'WRONG_ANSWER'

n=input()
m=input()
n=''.join(sorted(n))
for i in range(len(n)):
    if n[i]!='0':
        n=n[i]+n[:i]+n[i+1:]
        break
print(['OK','WRONG_ANSWER'][m!=n])

s=input()
k=s.count('0')
s=''.join(sorted(s))[k:]
print(['WRONG_ANSWER','OK'][input()==('0' if s=='' else s[0]+'0'*k+s[1:])])

n=input()
m=input()

if len(m)!=len(n):
    print("WRONG_ANSWER")
    exit()

a=list()
khong=0
tmp=""
for i in n:
    if i=='0':
        khong+=1
    else:
        a.append(i)
a.sort()
for i in a:
    if len(tmp)==1:
        tmp+=khong*"0"
        khong=0
    tmp+=i
if khong!=0:
    tmp+=khong*"0"
if tmp==m:
    print("OK")
else:
    print("WRONG_ANSWER")

a,b=[raw_input() for i in range(2)]
a=list(a)
aux=filter(lambda x:x!='0',a)
aux2=filter(lambda x:x=='0',a)
aux.sort()
for i in aux2:
    aux.insert(1,i)
a=''.join(aux)
if a==b:
    print "OK"
else:
    print "WRONG_ANSWER"

a = raw_input()
b = raw_input()

if(len(a) == len(b)):
    if(b[0] != "0" and len(b) > 1):
        aux = True
        for i in xrange(1, len(b)):
            if(i == 1):
                if((not (b[i-1] <= b[i])) and b[i] != "0"):
                    aux = False
            elif((not (b[i-1] <= b[i]))):
                aux = False
        if(aux):
            print("OK")
        else:
            print("WRONG_ANSWER")
    elif(len(b) == 1):
        if(b == a):
            print("OK")
        else:
            print("WRONG_ANSWER")
    else:
        print("WRONG_ANSWER")
else:
    print("WRONG_ANSWER")

def test(n, m):
    if n == 0:
        return m == 0
    nl = list(n)
    nl.sort()

    for i in range(0, len(nl)):
        if nl[i] != '0':
            if i != 0:
                nl[0], nl[i] = nl[i], nl[0]
            break

    return nl == list(m)

n = raw_input()
m = raw_input()    # can be 0001231231

if test(n, m):
    print "OK"
else:
    print "WRONG_ANSWER"

s=sorted(raw_input())
for i in range(len(s)):
	if s[i]!='0':t=s[i];s[i]=s[0];s[0]=t;break
print('WRONG_ANSWER','OK')[''.join(s)==raw_input()]

ini=list(raw_input())
ini.sort()
cnt=0
for i in range(len(ini)):
	if ini[i]=='0':
		continue
	elif i!=0 and ini[i-1]=='0':
		ini[0],ini[i]=ini[i],ini[0]
		break
	else:
		break
inp2=list(raw_input())
if ini==inp2:
	print "OK"
else:
	print "WRONG_ANSWER"

def find_lowest_not_zero(digits):
    minimal = 10
    min_pos = -1
    for i in xrange(len(digits)):
        curr = digits[i]
        if curr != 0 and curr < minimal:
            minimal = curr
            min_pos = i

    if min_pos == -1:
        raise Exception("lowest not zero not found")

    return (minimal, min_pos)

def list_to_num(l):
    s = ''.join(map(str, l))
    return int(s)

num = int(raw_input())
digits = [int(d) for d in str(num)]

try:
    (lnz, lnz_pos) = find_lowest_not_zero(digits)

    digits.pop(lnz_pos)
    final_rightside = digits

    final_rightside.sort()
    final = [lnz]

    for v in final_rightside: final.append(v)
    final = list_to_num(final)

except Exception as e:
    final = num

if raw_input() == str(final):
    print 'OK'
else: print 'WRONG_ANSWER'

n = raw_input().strip()
m = raw_input().strip()

if n == '0' and m == '0':
	print 'OK'
	exit()

if m[0] == '0':
	print 'WRONG_ANSWER'
	exit()

for digit in m:
	if digit not in n:
		print 'WRONG_ANSWER'
		exit()

n_split = list(n)
n_split.sort()

if n_split[0] == '0':
	index = next((i for i, x in enumerate(n_split) if x != '0'), None)
	temp = n_split[index]
	n_split[index] = '0'
	n_split[0] = temp

if ''.join(n_split) != m:
	print 'WRONG_ANSWER'
else:
	print 'OK'

if __name__ == '__main__':
    n=raw_input()
    m=raw_input()
    l=len(n)
    n=list(n)
    n.sort()
    i=0
    while i<l and n[i]=='0':
        i+=1
    if i<l and i!=0:
        n[0]=n[i]
        n[i]='0'
    n=''.join(n)
    if n==m:
        print "OK"
    else:
        print "WRONG_ANSWER"

n = input()
m = input()
n1 = len(n)
m1 = len(m)
m = int(m)

n = list(map(int,sorted(n)))

zero=0
r=0
for i in n:
    if i==0:
        zero+=1
    else:
        r=r*10+i
        while zero>0:
            r = r*10
            zero -=1
if r==m and n1==m1:
    print("OK")
else:
    print("WRONG_ANSWER")

f=['WRONG_ANSWER','OK']
a=sorted([int(z)for z in list(input())])
b=[int(z)for z in list(input())]
# attention: if a = 0, 0, 0...
if 0 in a:
    i=a.count(0)
    if i>=len(a):
        a=[0]
    else:
        a[i],a[0]=a[0],a[i]
print(f[a==b])

__author__ = 'Darren'

def solve():
    n_list = [x for x in input()]
    m = input()
    n_list.sort()
    zeros = n_list.count('0')
    if zeros != len(n_list):
        n_list[0], n_list[zeros] = n_list[zeros], n_list[0]
    if ''.join(n_list) == m:
        print('OK')
    else:
        print('WRONG_ANSWER')

if __name__ == '__main__':
    solve()

s = raw_input();
t = raw_input();

flag = 1;
for i in range(len(s)):
	if s.count(s[i]) != t.count(s[i]):
		flag = 0; break;
#print flag
pos = 0

if t[0] == '0' and len(t) > 1:
	flag = 0;
if flag:
	for i in range(pos+1, len(t)):
		if t[i] == '0' and i == pos+1:
			continue;
		if t[i] < t[i-1]:
			flag = 0; break;
print "OK" if flag else "WRONG_ANSWER";

a , b = input() , input()
if a == '0':
    if b == '0':
        print("OK")
    else:
        print("WRONG_ANSWER")
else:
    x,y = list(a) , list(b)
    x.sort()
    i = 0
    while x[i] == '0':
        i += 1
    x[i] , x[0] = x[0] ,x[i]

    if x == y:
        print("OK")
    else:
        print("WRONG_ANSWER")

n=input()
b=input()
l=[]
for i in range(len(n)):
    l.append(n[i])
l.sort()
i=0
while( i<len(n)):
    if(l[i]=='0'):
        pass
    else:
        break
    i+=1
if(l[len(n)-1]=='0'):
    pass
else:
    tmp=l[0]
    l[0]=l[i]
    l[i]=tmp
q=''.join(l)
if(q==b):
    print("OK")
else:
    print("WRONG_ANSWER")

a = list(input())
b = input()
a.sort()
cnt = a.count('0')
i = 0
while i < cnt:
    a.remove(a[0])
    i += 1
if len(a) > 0:
    a[0] += ('0' * cnt)
else:
    a.append('0' * cnt)
ans = ''.join(a)
b = str(b)
if ans == b:
    print('OK')
else:
    print("WRONG_ANSWER")

a = input()
n = [0] * 10

for x in a:
    y = int(x)
    n[y] += 1

first = False
res = ''
for i, x in enumerate(n[1:]):
    if x:
        if not first:
            res = str(i + 1) + '0' * n[0] + str(i + 1) * (x - 1)
            first = True
        else:
            res += str(i + 1) * x
if not res and a:
    res = a
if res == input():
    print('OK')
else:
    print('WRONG_ANSWER')

r=lambda:map(int,raw_input().split())

def main():
	n=int(raw_input())

	moo=raw_input()
	if( len(moo) > 0):
		if( moo.find('0') == 0 and len(moo) > 1 ):
			print "WRONG_ANSWER"
			return
	m=int(moo)

	#n=3310
	#m=1033

	correct = list(str(n))
	correct = sorted(correct)

	for letter in range(len(correct)):
		if( correct[letter]!='0' ):
			t=correct[letter]
			del( correct[letter] )
			correct = [t] + correct
			break

	#print "".join([str(x) for x in correct])

	nn=int( "".join(correct) )
	if nn==m:
		print "OK"
	else:
		print "WRONG_ANSWER"

main()

"""
One cold winter evening Alice and her older brother Bob was sitting at home near the fireplace and giving each other interesting problems to solve. When it was Alice's turn, she told the number n to Bob and said:

—Shuffle the digits in this number in order to obtain the smallest possible number without leading zeroes.

—No problem! — said Bob and immediately gave her an answer.

Alice said a random number, so she doesn't know whether Bob's answer is correct. Help her to find this out, because impatient brother is waiting for the verdict.

Input
The first line contains one integer n (0 ≤ n ≤ 109) without leading zeroes. The second lines contains one integer m (0 ≤ m ≤ 109) — Bob's answer, possibly with leading zeroes.

Output
Print OK if Bob's answer is correct and WRONG_ANSWER otherwise.
"""

q = list(map(int, list(input())))
q_set = set(q)

a = input()

if len(q) == 1:
    print("OK" if (int(a) == q[0] and len(a) == 1) else "WRONG_ANSWER")

else:
    answer  = ''

    has_zero = 0 in q_set
    if has_zero:
        q_set.remove(0)

    min_elm = min(q_set)
    q_set.remove(min_elm)
    answer += str(min_elm) + ('0' if has_zero else '') + str(min_elm)* (q.count(min_elm) - 1)

    while q_set:
        min_elm = min(q_set)
        q_set.remove(min_elm)
        answer += str(min_elm)*q.count(min_elm)

    print("OK" if a == answer else "WRONG_ANSWER")

def sort(items):
	c = -1

	while c != 0:
		c = 0

		for i in range(0, len(items) - 1):
			if items[i] > items[i + 1]:
				items[i], items[i + 1] = items[i + 1], items[i]
				c += 1

	return items

def intListToString(items):
	result = ""

	for item in items:
		result += str(item)

	return result

question = list(input())
answer = input()

for i in range(0, len(question)):
	question[i] = int(question[i])

question = sort(question)

if question[0] == 0:
	found = -1

	for i in range(0, len(question)):
		if question[i] != 0:
			found = i
			break

	if found != -1:
		question[0], question[found] = question[found], question[0]

if intListToString(question) == answer:
	print("OK")
else:
	print("WRONG_ANSWER")

s=input()
answer=input()
r=list(s)
r.sort()
s=''.join(r)
r=s.rfind('0')
if r!=-1 and len(s)>r+1:
    s=s[r+1]+s[:r+1]+s[r+2:]
if s==answer:
    print('OK')
else:
    print('WRONG_ANSWER')

n=str(input())
m=str(input())
length=len(n)
arr=[]
for i in range(0,length,1):
    arr.append(n[i])

arr.sort()
if(arr[0]=='0'):
    for i in range(0,length,1):
        if(arr[i]!='0'):
            arr[0]=arr[i]
            arr[i]='0'
            break

w=map(str,arr)
y=''.join(w)
haha=str(y)
if(haha==m):
    print("OK")
else:
    print("WRONG_ANSWER")

#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    n = "".join(sorted([c for c in raw_input()]))
    m = raw_input()
    l = len(n) - len(str(int(n)))
    if l != 0:
        n = n[l] + '0'*l + n[l+1:]
    if (int(n) == 0 and int(m) == 0 and len(m) != len(n)) or m != n:
        print "WRONG_ANSWER"
    else:
        print "OK"
    return 0

if __name__ == '__main__':
    main()

s=input()
s1=input()

if(len(s)!=len(s1)):
    print('WRONG_ANSWER')
    exit()
elif(len(s)==len(s1) and s1==s and len(s)==1):
    print('OK')
    exit()
l=[]
mn=10**9+7
ln=0
for i in s:
    ln+=1
    k=int(i)
    if(k!=0 and k<mn):
        mn=k

    l.append(k)

l=sorted(l)
if(l[0]==0):
    for i in range(ln):
        if(l[i]==mn):
            del l[i]
            break
    s=[str(i) for i in l]
    s2=''.join(s)
    s2=str(mn)+s2
else:
    s = [str(i) for i in l]
    s2 = ''.join(s)

if(s1==s2):
    print('OK')
else:
    print('WRONG_ANSWER')

import sys
from itertools import product

file = sys.stdin
#file = open("test", "r")
p = map(int, list(file.readline().rstrip()))
p.sort()
for i in range(len(p)):
    if p[i] != 0:
        temp = p.pop(i)
        p.insert(0, temp)
        break

ans =  "".join(map(str, p))
bro = file.readline().rstrip()
if ans == bro:
    print "OK"
else:
    print "WRONG_ANSWER"

original = input()
perm = input()

if ''.join(sorted(original)) == ''.join(sorted(perm)):
	o = sorted(original)
	if o[0] == '0':
		for i in range(0,len(o)):
			if o[i] != '0':
				o[0] = o[i]
				o[i] = '0'
				break
	for i in range(0,len(o)):
		if o[i] != perm[i]:
			print ("WRONG_ANSWER")
			exit()
	print ("OK")
else:
	print ("WRONG_ANSWER")

t = 1
while t > 0 :
    t -= 1
    a = list(input())
    b = list(input())
    a.sort()
    z =- 9
    for i in range(len(a)):
        if a[i] != '0':
            z = a[i]
            a.pop(i)
            break
    if z != -9:
        a.insert(0,z)
    if a == b :
        print("OK")
    else:
        print("WRONG_ANSWER")

n = list(input())
t = input()
n = sorted(n)
if(n[0]=='0'):
    for i in range(len(n)):
        if(n[i]!='0'):
            n[0],n[i] = n[i],n[0]
            break
    if(str(''.join(n))==t):
        print('OK')
    else:
        print('WRONG_ANSWER')
else:
    if(str(''.join(n))==t):
        print('OK')
    else:
        print('WRONG_ANSWER')

#coding:utf8
n=raw_input()
m=raw_input()
n=sorted(n)
if(len(n)>1 and n[0]=='0'):
    tmp = n[0]
    n[0] = n[1]
    n[1] = tmp
n = ''.join(n)#将''作为分隔符
if(n==m):
    print 'OK'
else:
    print'WRONG_ANSWER'

s = str(input())
a = str(input())
ans=''
x = {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0}
for i in range(len(s)):
    n = int(s[i])
    x[int(n)] += 1
k=0
l=0
flag=0
f2=0
for j in range(1,10):
    if x[j] != 0:
        for k in range(x[j]):
            if f2 == 0:
                flag = 1
            ans=ans+str(j)
            if flag == 1:
                f2=1
                flag=0
                for l in range(x[0]):
                    ans=ans+'0'
            #print(j,end='')
    #print(ans)
if ans == '':
    ans = s
if ans == a:
    print("OK")
else:
    print("WRONG_ANSWER")

n = input()
otv = input()
rez = ''
nul = 0
for i in sorted(n):
    if i == '0':
        nul += 1
        continue
    else:
        rez += i + '0' * nul
        nul = 0
if otv == rez or (otv == n and n == '0'):
    print('OK')
else:
    print('WRONG_ANSWER')

s=str(input())
s1=str(input())
if('0' not in s):
    e=sorted(s)
    f=''
    f=f.join(e)
    if(f==s1):
        print('OK')
    else:
        print('WRONG_ANSWER')
else:
    e=sorted(s)
    g=-1
    for i in range(0,len(e)):
        if(e[i]!='0'):
            g=i
            break
    if(g!=-1):
        e.insert(0,e[g])
        e.pop(g+1)
    h=''
    h=h.join(e)
    if(h==s1):
        print('OK')
    else:
        print('WRONG_ANSWER')

def countzero(inpt):
	rt = 0
	for i in range(len(inpt)):
		if inpt[i] == '0':
			rt += 1
	return rt

a = input()
b = input()
sted = ''.join(sorted(a))
if countzero(sted) < len(sted):
	op = ''.join([sted[countzero(sted)], '0'*countzero(sted), sted[1+countzero(sted):len(sted)]])
else:
	op = sted
print("OK" if b == op else "WRONG_ANSWER")

def Ordenar(N):
    Ordenado = ''
    A = [0]*10
    for k in N:
        for i in range (0,10):
            if int(k)==i:
                A[i] += 1
    Aux = 0
    for k in range (1,10):
        if A[k]!=0:
            Aux = k
            A[k] = A[k]-1
            break
    Ordenado = str(Aux)
    for j in range (A[0]):
        if A[0]!=0:
            Ordenado += str(0)
    for k in range (1,10):
        if A[k]!=0:
            for i in range(A[k]):
                Ordenado += str(k)
    return Ordenado
A = input()
B = input()
Ord = Ordenar(A)
if A=='0':
    if B=='0':
        print('OK')
    else:
        print('WRONG_ANSWER')
else:
    if Ord == B:
        print('OK')
    else:
        print('WRONG_ANSWER')

b=str(input())
lu=str(input())
if int(b)<10 and int(b)>0:
      z=b
else:
        if int(b)==0 and int(lu)==0:
                if len(b)==len(lu):
                        z=b
                else:
                        z=int(b)

        else:
                a=[]*len(b)
                lo=0
                for i in range (0,len(b)):
                        a.append(int(b[i]))

                for k in range (1,len(a)):
                        for t in range (len(a)-k):
                                if (a[t])>(a[t+1]):
                                        p=(a[t])
                                        a[t]=(a[t+1])
                                        a[t+1]=p

                g=0

                if len(a)==1 and a[0]==0:
                        z=str(0)

                else:

                        while a[0]==0:
                                a.remove(0)
                                g=g+1
                        z=a[0]
                        if len(a)==1:
                                z=int(b)
                        else:
                                del a[0]
                                q=str(a[0])
                                for i in range (1,len(a)):
                                        q+=""+str(a[i])
                                z=str(z)+str(0)*g+q

if lu==z:
        print("OK")
else:
        print("WRONG_ANSWER")

c=[0]*10
for x in input():
    c[ord(x)-ord('0')]+=1
t=[]
t.append(c[1]*'1')
t.append(c[0]*'0')
for i in range(2,10):
    if c[i]==0:
        continue
    t.append(c[i]*chr(ord('0')+i))
s=input()
if (len(s)==1 and s[0]=='0') or (s[0]!='0' and s==''.join(t)):
    print('OK')
else:
    print('WRONG_ANSWER')

n = input()
m = raw_input()

tab = sorted(list(str(n)))

if sorted(list(m)) != tab:
    print 'WRONG_ANSWER\n'
    tab = []

for i in range(len(tab)):
    if tab[i] != '0':
        if ''.join(list(tab[i])+tab[:i]+tab[i+1:]) == m:
            print 'OK\n'
        else:
            print 'WRONG_ANSWER\n'
        tab = []
        break

if len(tab):
    print 'OK\n'

#------------------------------------------------------------------------
# Name:        module2
# Purpose:
#
# Author:      co
#
# Created:     05/10/2011
# Copyright:   (c) u161283f 2011
# Licence:     <your licence>
#------------------------------------------------------------------------
#!/usr/bin/env python

alice=input()
bob=raw_input()

correct=list(str(alice))
correct.sort()
reverses=correct[:]
reverses.reverse()
if alice==0:
    pass
elif "0" in correct:
    not_zero_index=len(correct)-reverses.index("0")
    correct[0],correct[not_zero_index]=correct[not_zero_index],correct[0]

correct="".join(correct)

if bob==correct:
    print "OK"
else:
    print "WRONG_ANSWER"

n, shuffled = sorted([int(d) for d in input()]), input()
if str(int(shuffled)) != shuffled:
    print("WRONG_ANSWER")
    exit(0)
zeros = n.count(0)
n = n[zeros:zeros+1] + [0] * zeros + n[zeros+1:]
print("OK") if int("".join(map(str, n))) == int(shuffled) else print("WRONG_ANSWER")

number = list(input())
answer = list(input())
number.sort()
if(len(number) == 1):
	print("OK") if number == answer else print("WRONG_ANSWER")
else:
	i = 0
	while i < len(number) and number[i] == "0": i+=1

	test = [number[i]] + number[:i] + number [i+1:]
	print("OK") if test == answer else print("WRONG_ANSWER")

class A:

    def rotate_keypad(self, keypad):
        reversed_rows = list(reversed(keypad))
        return ["".join(list(reversed(x))) for x in reversed_rows]

    def solve(self):
        keypad = [input(), input(), input()]
        if keypad == self.rotate_keypad(keypad):
            print("YES")
        else:
            print("NO")

class B:

    def solve(self):
        alice = input()
        bob = input()

        if bob[0] == '0' and alice[0] != '0':
            print("WRONG_ANSWER")
            return
        elif bob[0] == '0' and alice[0] == '0' and len(bob) != 1:
            print("WRONG_ANSWER")
            return

        bob = int(bob)

        from itertools import permutations

        smallest = int(alice)
        if smallest == 0:
            if bob == 0:
                print("OK")
            else:
                print("WRONG_ANSWER")
        else:
            smallest = min([int("".join(list(perm))) for perm in permutations(sorted(alice)) if perm[0] != '0'])
            if smallest == bob:
                print("OK")
            else:
                print("WRONG_ANSWER")

class C:

    def solve(self):
        [n, m] = [int(x) for x in input().split(" ")]
        prices = sorted([int(x) for x in input().split(" ")])

        fruits = []
        for i in range(m):
            fruits.append(input())

        from collections import Counter
        frequent_fruits = [f for (f, p) in Counter(fruits).most_common()]

        price_assignment = {}
        for f, p in zip(frequent_fruits, prices):
            price_assignment[f] = p

        smallest_price = sum([price_assignment[f] for f in fruits])

        for f, p in zip(frequent_fruits, list(reversed(prices))):
            price_assignment[f] = p

        largest_price = sum([price_assignment[f] for f in fruits])

        print("{} {}".format(smallest_price, largest_price))

class D:

    def solve(self):
        n = int(input())
        ladies = []

        for x in input().split(" "):
            ladies.append([x])

        for i, x in enumerate(input().split(" ")):
            ladies[i].append(x)

        for i, x in enumerate(input().split(" ")):
            ladies[i].append(x)

        self_murderers = 0
        for i in range(n):
            if any([ladies[i][0] < ladies[x][0] and\
                    ladies[i][1] < ladies[x][1] and\
                    ladies[i][2] < ladies[x][2] for x in range(n) if x != i]):
                self_murderers += 1

        print(self_murderers)

class E:

    def generate_matrix(self, i, j, n, matrix):
        if i == j:
            matrix[i][j] = 0
        else:
            if matrix[i][j] == 0:
                dictionary = {}
                for e in matrix[i]:
                    dictionary[e] = True
                for e in matrix[j]:
                    dictionary[e] = True
                for index in range(n):
                    if index not in dictionary:
                        matrix[i][j] = index
                        matrix[j][i] = index
                        break

    def solve(self):
        n = int(input())

        matrix = [[0 for i in range(n)] for j in range(n)]
        for i in range(n):
            for j in range(n):
                self.generate_matrix(i, j, n, matrix)
        transponse = list(map(list, zip(*matrix)))
        if matrix != transponse:
            raise Exception("FC")
        print("\n".join([" ".join([str(y) for y in x]) for x in matrix]))

B().solve()

x = raw_input()
answer = raw_input()

if (x == '0'):
    if (answer[0] == '0') and (answer.lstrip('0') == ''):
        print 'OK'
    else:
        print 'WRONG_ANSWER'

else:

    answer = answer.lstrip('0')

    countnum = []
    for number in range(10):
        countnum.append(x.count(str(number)))
    ##print countnum

    num = ''
    for i in range(1,10):
            num = num + str(i) * countnum[i]

    zeros = '0' * countnum[0]

    ##print zeros

    r_ans = num[0] + zeros + num[1:]
    ##print r_ans
    if r_ans == answer:
        print 'OK'
    else:
        print 'WRONG_ANSWER'

print ['WRONG_ANSWER', 'OK'][sorted(raw_input()) == sorted(raw_input())]

a = raw_input()
b = raw_input()
x = []
for i in a:
    x.append(i)
x.sort()
i = 0
while i<len(x) and x[i] == '0':
    i+=1

if i != len(x):
    s = x[i]

    for j in xrange(0,len(x)):
        if j!=i:
            s+=x[j]
else:
    s = "0"

if b[0] == '0':
    print "WRONG_ANSWER"
elif int(s) != b:
    print "WRONG_ANSWER"
else:
    print "OK"

# -*- coding: UTF-8 -*-

# from itertools import *
# from collections import defaultdict

# def gcd(a,b):
#     while b > 0: a,b = b, a%b
#     return a

# def baseN(num,b,numerals="0123456789abcdefghijklmnopqrstuvwxyz"):
#     return ((num == 0) and  "0" ) or ( baseN(num // b, b).lstrip("0") + numerals[num % b])
a = raw_input()
zeros = a.count("0")
a = a.replace("0", "")
a = sorted(a)
if len(a) > 1:
    if a[0]+"0"*zeros+"".join(a[1:]) == raw_input():
        print "OK"
    else:
        print "WRONG_ANSWER"
else:
    if len(raw_input()) == 1:
        print "OK"
    else:
        print "WRONG_ANSWER"

n = input()
m = input()
mzeros = 0
for i in range(0,len(m)):
    if m[i] != '0':
        mzeros = i
        break
m = m[mzeros:]
ndigits = []
for i in n:
    ndigits.append(i)

snd = sorted(ndigits)
numberofzeros = 0
for i in range(0,len(snd)):
    if snd[i] != '0':
        numberofzeros = i
        break
numberofones = 0
for i in range(numberofzeros,len(snd)):
    if snd[i] != '1':
        numberofones = i-numberofzeros
        break
if snd[len(snd)-1] == '1':
    numberofones = len(snd)-numberofzeros
otherdigits = snd[1+numberofzeros+numberofones:]
if numberofones >= 1:
    answer = '1'+'0'*numberofzeros+'1'*(numberofones-1)
else:
    answer = snd[numberofzeros]+'0'*numberofzeros
for j in otherdigits:
    answer = answer+j

if n == '0':
    for i in range(1,11):
        if m == '0'*i:
            print('OK')
elif m == answer:
    print('OK')
else:
    print('WRONG_ANSWER')

r=lambda:map(int,raw_input().split())

def main():
	n=int(raw_input())
	m=int(raw_input())

	#n=3310
	#m=1033

	correct = list(str(n))
	correct =sorted(correct)

	for letter in range(len(correct)):
		if( correct[letter]!='0' ):
			t=correct[letter]
			del( correct[letter] )
			correct = [t] + correct
			break

	#print "".join([str(x) for x in correct])

	nn=int( "".join(correct) )
	if nn==m:
		print "OK"
	else:
		print "WRONG_ANSWER"

main()

s = str(raw_input())
ss = str(raw_input())
n = len(s)
flg = True
s = sorted(s)
i = 0
if s[i]=='0':
    ind = 0
    while i<n and s[i]=='0':
        i+=1
    if i<n:
        s[ind],s[i] = s[i],s[ind]
        flg = True
    else:
        flg = False
if flg:
    s = ''.join(s)
    if s==ss:
        print "OK"
    else:
        print "WRONG_ANSWER"
else:
     print "WRONG_ANSWER"

import sys
import os
from io import IOBase, BytesIO
# import heapq
# import math
# import collections
# import itertools
# import bisect
mod = 10 ** 9 + 7
pie = 3.1415926536
#import resource
#resource.setrlimit(resource.RLIMIT_STACK, [0x100000000, resource.RLIM_INFINITY])
#import threading
# threading.stack_size(2**27)
#import sys
# sys.setrecursionlimit(10**6)
# fact=[1]
# for i in range(1,1000001):
#    fact.append((fact[-1]*i)%mod)
# ifact=[0]*1000001
# ifact[1000000]=pow(fact[1000000],mod-2,mod)
# for i in range(1000000,0,-1):
#    ifact[i-1]=(i*ifact[i])%mod
#from random import randint as rn
#from Queue import Queue as Q

def modinv(n, p):
    return pow(n, p-2, p)

def ncr(n, r, p):  # for using this uncomment the lines calculating fact and ifact
    t = ((fact[n])*((ifact[r]*ifact[n-r]) % p)) % p
    return t

def ain():  # takes array as input
    return list(map(int, sin().split()))

def sin():
    return input().strip()

def GCD(x, y):
    while(y):
        x, y = y, x % y
    return x

def read2DIntArray(row, col):
    arr = []
    for i in range(0, row):
        temp = list(map(int, sin().split()))
        arr.append(temp)

    return arr

def read2DCharArray(row, col):
    arr = []
    for i in range(0, row):
        temp = str(sin())
        arr.append(temp)

    return arr

# Smallest number by rearranging digits of a given number (without trailing zeros):-

def smallestNumber(n):
    lst = list(str(n))
    lst.sort()

    tmp = 0
    for i, n in enumerate(lst):
        if (n != '0'):
            tmp = lst.pop(i)
            break

    return str(tmp) + ''.join(lst)

"""***************************************************************************************"""

def main():
    n = int(sin())
    m = int(sin())

    num = int(smallestNumber(n))

    if (m == num):
        print("OK")
    else:
        print("WRONG_ANSWER")

"""***************************************************************************************"""

# Python 2 and 3 footer by Pajenegod and c1729
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2),
                   super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

def input(): return sys.stdin.readline().rstrip('\r\n')

if __name__ == '__main__':
    main()
# threading.Thread(target=main).start()

num0 =input()
num1 =int(input())
count =0
charr =[]
for ch in num0:
    if ch != '0':
        charr.append(int(ch))
        continue
    count+=1
charr.sort()
for i in range(count):
    charr.insert(1,0)
for i in range(len(charr)):
    charr[i] =str(charr[i])
charr =''.join(charr)
charr =int(charr)
if charr == num1:
    print('OK')
    quit()
print('WRONG_ANSWER')

def sort(items):
	c = -1

	while c != 0:
		c = 0

		for i in range(0, len(items) - 1):
			if items[i] > items[i + 1]:
				items[i], items[i + 1] = items[i + 1], items[i]
				c += 1

	return items

def listToInt(items):
	result = 0

	for i in range(len(items) - 1, -1, -1):
		result += items[i] * (10**(len(items) - i - 1))
	return result

question = list(input())
answer = int(input())

for i in range(0, len(question)):
	question[i] = int(question[i])

question = sort(question)

if question[0] == 0:
	found = -1

	for i in range(0, len(question)):
		if question[i] != 0:
			found = i
			break

	if found != -1:
		question[0], question[found] = question[found], question[0]

if listToInt(question) == answer:
	print("OK")
else:
	print("WRONG_ANSWER")

first =list(input())# получаем список с строковыми элементами  ['3', '3', '1', '0']
second = input()
first_reverse = first[::-1] # переворачивам
if first_reverse[0] == "0": # если первый элемент 0, то перебираем дальше список, пока не найдем отличный от 0 элемент
	for i in first_reverse:
		if i != "0":
			y =first_reverse.index(i)# получаем индекс первого отличного от нуля элемента
			first_reverse[0],first_reverse[y] = first_reverse[y],first_reverse[0]# меняем местами значения, без помози буферной пер
			break
result = ''.join(first_reverse)# соединяем элементы воедино
#print(result)
if result == second:#сравниваем и выводим
	print("OK")
else: print("WRONG_ANSWER")

s = raw_input();
t = raw_input();

flag = 1;
for i in range(len(s)):
	if s.count(s[i]) != t.count(s[i]):
		flag = 0; break;
#print flag
if flag:
	for i in range(1, len(t)):
		if t[i] < t[i-1]:
			if t[i] == '0' and i == 1:
					continue;
			flag = 0; break;
print "OK" if flag else "WRONG_ANSWER";

n = input()
m = input()
mzeros = 0
for i in range(0,len(m)):
    if m[i] != '0':
        mzeros = i
        break
m = m[mzeros:]
ndigits = []
for i in n:
    ndigits.append(i)

snd = sorted(ndigits)
numberofzeros = 0
for i in range(0,len(snd)):
    if snd[i] != '0':
        numberofzeros = i
        break
numberofones = 0
for i in range(numberofzeros,len(snd)):
    if snd[i] != '1':
        numberofones = i-numberofzeros
        break
if snd[len(snd)-1] == '1':
    numberofones = len(snd)-numberofzeros
otherdigits = snd[numberofzeros+numberofones:]
answer = '1'+'0'*numberofzeros+'1'*(numberofones-1)
for j in otherdigits:
    answer = answer+j

if n == '0':
    for i in range(1,11):
        if m == '0'*i:
            print('OK')
elif m == answer:
    print('OK')
else:
    print('WRONG_ANSWER')

r=lambda:map(int,raw_input().split())

def main():
	n=int(raw_input())

	moo=raw_input()
	if( len(moo) > 0):
		if( moo.find('0') == 0 ):
			print "WRONG_ANSWER"
			return
	m=int(moo)

	#n=3310
	#m=1033

	correct = list(str(n))
	correct = sorted(correct)

	for letter in range(len(correct)):
		if( correct[letter]!='0' ):
			t=correct[letter]
			del( correct[letter] )
			correct = [t] + correct
			break

	#print "".join([str(x) for x in correct])

	nn=int( "".join(correct) )
	if nn==m:
		print "OK"
	else:
		print "WRONG_ANSWER"

main()

def solve():
    digits = [0]*10
    n = list(raw_input().strip())
    for i in n:
        digits[int(i)] += 1
    m = list(raw_input().strip())
    if len(n)!=len(m):
        print 'WRONG_ANSWER'
        return
    for i in xrange(1,10):
        if digits[i]!=0:
            if m[0] != str(i):
                print 'WRONG_ANSWER'
                return
            digits[i] -= 1
            m.pop(0)
            break
    for i in m:
        digits[int(i)] -= 1
    for i in digits:
        if i!=0:
            print 'WRONG_ANSWER'
            return
    print 'OK'

solve()

class CodeforcesTask12BSolution:
    def __init__(self):
        self.result = ''
        self.number = 0
        self.solution = 0

    def read_input(self):
        self.number = int(input())
        self.solution = input()

    def process_task(self):
        try:
            if len(str(self.solution)) > 1 and str(self.solution)[0] == "0":
                self.result = "WRONG_ANSWER"
            else:
                cnts = [0] * 10
                for c in str(self.number):
                    cnts[int(c)] += 1
                start = min([int(x) for x in str(self.number) if int(x)])
                cnts[start] -= 1
                res = [start]
                for x in range(10):
                    res += [x] * cnts[x]
                real_result = int("".join([str(x) for x in res]))
                self.result = "OK" if real_result == int(self.solution) else "WRONG_ANSWER"
        except ValueError:
            self.result = "WRONG_ANSWER"

    def get_result(self):
        return self.result

if __name__ == "__main__":
    Solution = CodeforcesTask12BSolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())

n = raw_input('')
m = raw_input('')

bl = 0

if m[0] != '0':
    dl = len(n)

    sp = []

    for x in range(dl):
        sp.append(n[x])

    sp = [int(x) for x in sp]
    sp.sort()

    kol = sp.count(0)

    if kol != 0 and kol != dl:
        ch = sp[kol]
        sp[0] = ch
        sp[kol] = 0

    if kol != dl:
        sp = [str(x) for x in sp]

        pStr = ''
        pStr = pStr.join(sp)

        if pStr == m:
            bl = 1
            print 'OK'

if bl == 0:
    print 'WRONG_ANSWER'

s = str(input())
a = str(input())
ans=''
x = {0:0, 1:0, 2:0, 3:0, 4:0, 5:0, 6:0, 7:0, 8:0, 9:0}
for i in range(len(s)):
    n = int(s[i])
    x[int(n)] += 1
k=0
l=0
for k in range(x[1]):
    ans=ans+'1'
for l in range(x[0]):
    ans=ans+'0'
j=2
for j in range(2,10):
    if x[j] != 0:
        for k in range(x[j]):
            ans=ans+str(j)
            #print(j,end='')
#print(ans)
#print(a)

if ans == a:
    print("OK")
else:
    print("WRONG_ANSWER")

'''
Created on Jan 25, 2015

@author: mohamed265
'''
num = input()
res = input()
num = sorted(num)
index = 0
for i in range(len(num)):
    if num[i] != '0':
        index = i
        break
if index == 0:
    print("OK") if num == res else print("WRONG_ANSWER")
else:
    #print(num,index)
    temp = num[index]
    for i in range(index):
        temp+= "0"
    for i in range(index+1,len(num)):
        temp += num[i]
    #print(temp)
    print("OK") if temp == res else print("WRONG_ANSWER")

s=input()
z=input()
a=[0]*10
for c in s:
    a[int(c)]+=1
ans=""
for i in range(1,10):
    if a[i]>0:
        a[i]-=1
        ans=str(i)
        break
for i in range(0,10):
    for j in range(a[i]):
        ans+=str(i)
if ans==z:
    print("YES")
else:
    print("NO")

a=input()
b=input()
c=int(b)
n=len(a)
j=0
A=[]
while j<n:
    A.append(a[j])
    j=j+1
j=1
while j<n:
    key=A[j]
    i=j-1
    while i>-1 and A[i]>key:
        A[i+1]=A[i]
        i=i-1
    A[i+1]=key
    j=j+1
d=int(A[0])
j=0
if d==0:
    while j<n:
        if int(A[j])>0:
            break
        j=j+1
    if j==n:
        i=j-1
    else:
        i=j
    A[0],A[i]=A[i],A[0]
str=''
str=str.join(A)
e=int(str[0])
num=int(str)
if num==c:
    print('OK')
elif e==0:
    print('WRONG_ANSWER')
else:
    print('WRONG_ANSWER')

b=str(input())
lu=str(input())
if int(b)<10 and int(b)>0:
      z=b
else:
        if int(b)==int(lu):
                if len(b)==len(lu):
                        z=b
                else:
                        z=int(b)

        else:
                a=[]*len(b)
                lo=0
                for i in range (0,len(b)):
                        a.append(int(b[i]))

                for k in range (1,len(a)):
                        for t in range (len(a)-k):
                                if (a[t])>(a[t+1]):
                                        p=(a[t])
                                        a[t]=(a[t+1])
                                        a[t+1]=p

                g=0

                if len(a)==1 and a[0]==0:
                        z=str(0)

                else:

                        while a[0]==0:
                                a.remove(0)
                                g=g+1
                        z=a[0]
                        if len(a)==1:
                                z=int(b)
                        else:
                                del a[0]
                                q=str(a[0])
                                for i in range (1,len(a)):
                                        q+=""+str(a[i])
                                z=str(z)+str(0)*g+q

if lu==z:
        print("OK")
else:
        print("WRONG_ANSWER")

s=input()
s1=(input())
n=len(s)
w=[]
d=0
for i in range(0,n):
    w.append(int(s[i]))
w.sort()
for i in range(0,n):
    if(w[i]!=0):
        q=i
        d=d+1
        break
if(d==0):
    print("WRONG_ANSWER")
    exit(0)
else:
    s2=str(w[q])
for i in range(0,n):
    if(i!=q):
        s2=s2+str(w[i])
if(s2==s1 and int(s)>0):
    print("OK")
else:
    print("WRONG_ANSWER")

class A:

    def rotate_keypad(self, keypad):
        reversed_rows = list(reversed(keypad))
        return ["".join(list(reversed(x))) for x in reversed_rows]

    def solve(self):
        keypad = [input(), input(), input()]
        if keypad == self.rotate_keypad(keypad):
            print("YES")
        else:
            print("NO")

class B:

    def solve(self):
        alice = input()
        bob = int(input())

        from itertools import permutations

        smallest = int(alice)
        if smallest != 0:
            for perm in permutations(sorted(alice)):
                if int("".join(list(perm))) < smallest and \
                   not "".join(list(perm)).startswith("0"):
                    smallest = int("".join(list(perm)))

        if smallest == bob:
            print("OK")
        else:
            print("WRONG_ANSWER")

B().solve()

import sys
import os
from io import IOBase, BytesIO
# import heapq
# import math
# import collections
# import itertools
# import bisect
mod = 10 ** 9 + 7
pie = 3.1415926536
#import resource
#resource.setrlimit(resource.RLIMIT_STACK, [0x100000000, resource.RLIM_INFINITY])
#import threading
# threading.stack_size(2**27)
#import sys
# sys.setrecursionlimit(10**6)
# fact=[1]
# for i in range(1,1000001):
#    fact.append((fact[-1]*i)%mod)
# ifact=[0]*1000001
# ifact[1000000]=pow(fact[1000000],mod-2,mod)
# for i in range(1000000,0,-1):
#    ifact[i-1]=(i*ifact[i])%mod
#from random import randint as rn
#from Queue import Queue as Q

def modinv(n, p):
    return pow(n, p-2, p)

def ncr(n, r, p):  # for using this uncomment the lines calculating fact and ifact
    t = ((fact[n])*((ifact[r]*ifact[n-r]) % p)) % p
    return t

def ain():  # takes array as input
    return list(map(int, sin().split()))

def sin():
    return input().strip()

def GCD(x, y):
    while(y):
        x, y = y, x % y
    return x

def read2DIntArray(row, col):
    arr = []
    for i in range(0, row):
        temp = list(map(int, sin().split()))
        arr.append(temp)

    return arr

def read2DCharArray(row, col):
    arr = []
    for i in range(0, row):
        temp = str(sin())
        arr.append(temp)

    return arr

# Smallest number by rearranging digits of a given number (without trailing zeros):-

def smallestNumber(n):
    lst = list(str(n))
    lst.sort()

    tmp = 0
    for i, n in enumerate(lst):
        if (n != '0'):
            tmp = lst.pop(i)
            break

    return str(tmp) + ''.join(lst)

"""***************************************************************************************"""

def main():
    n = int(sin())
    m = int(sin())

    num = int(smallestNumber(n))

    if (num != 0 and m == num):
        print("OK")
    else:
        print("WRONG_ANSWER")

"""***************************************************************************************"""

# Python 2 and 3 footer by Pajenegod and c1729
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2),
                   super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill():
            pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill()
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

def input(): return sys.stdin.readline().rstrip('\r\n')

if __name__ == '__main__':
    main()
# threading.Thread(target=main).start()

a = raw_input()
b = raw_input()

z = a.count('0')*'0'
u = a.count('1')*'1'
d = a.count('2')*'2'
t = a.count('3')*'3'
q = a.count('4')*'4'
c = a.count('5')*'5'
s = a.count('6')*'6'
e = a.count('7')*'7'
o = a.count('8')*'8'
n = a.count('9')*'9'

tup = [u,d,t,q,c,s,e,o,n]
result = ''
first = True
for x in range(len(tup)):
	if(first and tup[x] != '' and z != ''):
		result = result + tup[x] + z
		first = False
	else:
		result = result + tup[x]
if(first):
	result = z

if (result==b ):
	print 'OK'
else:
	print 'WRONG_ANSWER'

n,s = input(), str(int(input()));
b = n;
n=list(n);
n.sort();
if len(n)>1:
    for x in n:
        if x!='0':
            ans=x;
            break;
    n.remove(ans);
    n.insert(0, ans);
n=''.join(n);
print(['WRONG_ANSWER','OK'][n==s and b>n]);

a = raw_input()
b = raw_input()

z = a.count('0')*'0'
u = a.count('1')*'1'
d = a.count('2')*'2'
t = a.count('3')*'3'
q = a.count('4')*'4'
c = a.count('5')*'5'
s = a.count('6')*'6'
e = a.count('7')*'7'
o = a.count('8')*'8'
n = a.count('9')*'9'

tup = [u,d,t,q,c,s,e,o,n]
tup.sort()
c = ""
first = True
for x in range(len(tup)):
	if(tup[x] != '' and first):
		c = c + tup[x] + z
		first = False
	else:
		c = c + tup[x]

if (first == True):
	c = z

if (c==b):
	print "OK"
else:
	print "WRONG_ANSWER"

def Ordenar(N):
    Ordenado = ''
    A = [0]*10
    for k in N:
        for i in range (0,10):
            if int(k)==i:
                A[i] += 1
    Aux = 0
    for k in range (1,10):
        if A[k]!=0:
            Aux = k
            break
    Ordenado = str(Aux)
    for j in range (A[0]):
        Ordenado += str(0)
    for k in range (2,10):
        if A[k]!=0:
            for i in range(A[k]):
                Ordenado += str(k)
    return Ordenado
A = input()
B = input()
Ord = Ordenar(A)
if Ord == B:
    print('OK')
else:
    print('WRONG_ANSWER')

n,s = list(input()), str(int(input()));
n.sort();
if len(n)>1:
    for x in n:
        if x!='0':
            ans=x;
            break;
    n.remove(ans);
    n.insert(0, ans);
n=''.join(n);
print(['WRONG_ANSWER','OK'][n==s]);

s=input()
s1=input()

if(len(s)!=len(s1)):
    print('WRONG_ANSWER')
    exit()
l=[]
mn=10**9+7
ln=0
for i in s:
    ln+=1
    k=int(i)
    if(k!=0 and k<mn):
        mn=k

    l.append(k)

l=sorted(l)
if(l[0]==0):
    for i in range(ln):
        if(l[i]==mn):
            del l[i]
            break
    s=[str(i) for i in l]
    s2=''.join(s)
    s2=str(mn)+s2
else:
    s = [str(i) for i in l]
    s2 = ''.join(s)

if(s1==s2):
    print('OK')
else:
    print('WRONG_ANSWER')

import collections
num1=input()
num2=input()
inp=[int(i) for i in num1]
outp=[int(i) for i in num2]
numbers=[0]*10#нулевая - число нулей, первая - число единиц, вторая - число двоек и т д
numbers_out=[0]*10
unique_nums=0
for i in range(len(inp)):
    numbers[inp[i]]+=1
    if numbers[inp[i]]==1:
        unique_nums+=1
    if i<len(outp):
        numbers_out[outp[i]]+=1
ans=True
if collections.Counter(numbers)!=collections.Counter(numbers_out):
    ans=False
if len(inp)!=len(outp):
    ans=False
have_been=set()
def min_set(a):
    a1=a.copy()
    if 0 in a1:
        a1.remove(0)
    if len(a1)>0:
        return min(a1)
    else:
        return -1

for j in range(len(outp)):
    i=outp[j]
    if numbers[i]==0:
        ans=False
    if i>0 and i<min_set(have_been):
        ans=False
    if len(have_been)>0 and i!=0:
        if i<max(have_been):
            ans=False
    if i==0 and len(have_been)!=1:
        ans=False
    if len(have_been)==1:
        g=have_been.pop()
        have_been.add(g)
        if numbers[g]!=0 and i!=g:
            ans=False
        if i==0 and numbers[g]==0 and j!=1:
            ans=False
    have_been.add(i)
    numbers[i]-=1

if ans:
    print('OK')
else:
    print('WRONG_ANSWER')

l=list(input())
m=int(input())
l.sort()

e=0
if(l[0]=='0'):
    for i in range(1,len(l)):
        if(l[i]!='0'):
            l[0]=l[i]
            l[i]='0'
            e=1
            break
        if(e==1):
            break
n=int("".join(l))
if(n==m):
    print('OK')
else:
    print('WRONG_ANSWER')

n = input()
m = input()
ndigits = []
for i in n:
    ndigits.append(i)

snd = sorted(ndigits)
numberofzeros = 0
for i in range(0,len(snd)):
    if snd[i] != '0':
        numberofzeros = i
        break
numberofones = 0
for i in range(numberofzeros,len(snd)):
    if snd[i] != '1':
        numberofones = i-numberofzeros
        break

otherdigits = snd[numberofzeros+numberofones:]
answer = '1'*numberofones+'0'*numberofzeros
for j in otherdigits:
    answer = answer+j
if m == answer:
    print('OK')
else:
    print('WRONG_ANSWER')

a = raw_input()
b = raw_input()

if(b[0] != '0'):
	z = a.count('0')*'0'
	u = a.count('1')*'1'
	d = a.count('2')*'2'
	t = a.count('3')*'3'
	q = a.count('4')*'4'
	c = a.count('5')*'5'
	s = a.count('6')*'6'
	e = a.count('7')*'7'
	o = a.count('8')*'8'
	n = a.count('9')*'9'

	tup = [u,d,t,q,c,s,e,o,n]
	tup.sort()
	tup.insert(1,z)
	c = ""
	for x in range(len(tup)):
		c = c + tup[x]

	if (c==b):
		print "OK"
	else:
		print "WRONG_ANSWER"
else:
	print "WRONG_ANSWER"

first =list(input())# получаем список с строковыми элементами  ['3', '3', '1', '0']
second = input()
out=""
if first[-1] == "0": # если последний элемент 0, то перебираем с конца список, пока не найдем отличный от 0 элемент
	i=2
	while(i<len(first)):
		if (first[- i] != "0"):
			first[-1], first[- i] = first[- i],first[-1] # меняем местами значения и выходим
			break
		i+=1
i=1
while(i<=len(first)): # выводим с конца
	out += first[-i]
	i+=1
print(out)
if out == second:#сравниваем и выводим
	print("OK")
else: print("WRONG_ANSWER")

class A:

    def rotate_keypad(self, keypad):
        reversed_rows = list(reversed(keypad))
        return ["".join(list(reversed(x))) for x in reversed_rows]

    def solve(self):
        keypad = [input(), input(), input()]
        if keypad == self.rotate_keypad(keypad):
            print("YES")
        else:
            print("NO")

class B:

    def solve(self):
        alice = input()
        bob = int(input())

        from itertools import permutations

        smallest = int(alice)
        for perm in permutations(alice):
            if int("".join(list(perm))) < smallest and \
               not "".join(list(perm)).startswith("0"):
                smallest = int("".join(list(perm)))

        if smallest < bob:
            print("WRONG_ANSWER")
        else:
            print("OK")

B().solve()

# -*- coding: UTF-8 -*-

# from itertools import *
# from collections import defaultdict

a = map(int, raw_input())
b = raw_input()
a = sorted(a)
a.reverse()
if not list(set(a))[0] == 0 and len(set(a)) == 1:
    while a[-1] == 0:
        a.insert(-1, a.pop())
    a.reverse()
a = [str(i) for i in a]
if "".join(a) == b:
    print "OK"
else:
    print "WRONG_ANSWER"

number=str(raw_input())
tab=[]

buff=[]
for i in number:
    tab.append(int(i))

tab.sort()

while 0 in tab:
    buff.append(tab[0])
    tab.remove(tab[0])

for i in buff:
    tab.insert(1, 0)

if (int(''.join(map(str,tab))))==int(raw_input()):
    print 'OK'
else:
    print 'WRONG_ANSWER'

def getMinGreaterThanZero(s):
    asdf = s[:]
    minNumber = min(asdf)
    while (minNumber == 0):
        asdf[asdf.index(minNumber)] = 1000
        minNumber = min(asdf)
        if minNumber == 1000:
            return -1

    return minNumber

import sys

n1 = sys.stdin.readline().strip()
n2 = sys.stdin.readline().strip()

n1 = map(int, list(str(int(n1))))

less = []

firstMin = getMinGreaterThanZero(n1)

if firstMin == -1:
    if int(n2) == 0:
        print "OK"
    else:
        print "WRONG_ANSWER"

    sys.exit(0)

n1[n1.index(firstMin)] = 1000

less.append(firstMin)
for i in range(1, len(n1)):
    minNum = min(n1)
    less.append(minNum)
    n1[n1.index(minNum)] = 1000

less = ''.join(map(str, less))

if int(less) == int(n2):
    print "OK"
else:
    print "WRONG_ANSWER"

a=input()
b=input()
c=int(b)
n=len(a)
j=0
A=[]
while j<n:
    A.append(a[j])
    j=j+1
j=1
while j<n:
    key=A[j]
    i=j-1
    while i>-1 and A[i]>key:
        A[i+1]=A[i]
        i=i-1
    A[i+1]=key
    j=j+1
d=int(A[0])
j=0
if d==0:
    while j<n:
        if int(A[j])>0:
            break
        j=j+1
    if j==n:
        i=j-1
    else:
        i=j
    A[0],A[i]=A[i],A[0]
str=''
str=str.join(A)
e=int(b[0])
num=int(str)

if e==0:
    print('WRONG_ANSWER')
elif num==c:
    print('OK')
else:
    print('WRONG_ANSWER')

def solve():
    digits = [0]*10
    n = list(raw_input().strip())
    for i in n:
        digits[int(i)] += 1
    m = list(raw_input().strip())
    if len(n)!=len(m):
        print 'WRONG_ANSWER'
        return
    for i in xrange(1,10):
        if digits[i]!=0:
            if m[0] != str(i):
                print 'WRONG_ANSWER'
                return
            digits[i] -= 1
            m.pop(0)
            break
    for i in m:
        digits[int(i)] -= 1
    for i in digits:
        if i!=0:
            print 'WRONG_ANSWER'
            return
    print 'OK'

solve()

class A:

    def rotate_keypad(self, keypad):
        reversed_rows = list(reversed(keypad))
        return ["".join(list(reversed(x))) for x in reversed_rows]

    def solve(self):
        keypad = [input(), input(), input()]
        if keypad == self.rotate_keypad(keypad):
            print("YES")
        else:
            print("NO")

class B:

    def solve(self):
        alice = list(input())
        bob = int(input())

        sorted_alice = sorted(alice)
        smallest_number = []
        done = False

        for j in range(len(sorted_alice)):
            if int(sorted_alice[j]) != 0:
                break

        if j == len(sorted_alice):
            smallest_number = ["0"]
            done = True

        if not done:
            smallest_number = [sorted_alice[j]]
            sorted_alice[j] = -1

            for i in range(len(alice)):
                if int(sorted_alice[i]) < 0:
                    continue
                smallest_number.append(sorted_alice[i])

        smallest_number = int("".join(smallest_number))
        if smallest_number < bob:
            print("WRONG_ANSWER")
        else:
            print("OK")

B().solve()

s=[int(n) for n in input()]
z=[int(n) for n in input()]
s.sort()
m=v=0
for n in range(len(s)):
	if s[n]!=0:
		s[0]=s[n]
		s[n]=0
#1³print(s)
for n in range(len(s)):
	m+=s[n]*10**(n)
for n in range(len(z)):
	v+=z[n]*10**(n)
if m==v:
	print('OK')
else:
	print('WRONG_ANSWER')

s = [int(ch) for ch in input()]
ss = [int(ch) for ch in input()]
if s==[0] and ss==[0]:
    print("OK")
    exit()
s.sort()
ans=[]
for i in range(len(s)):
    if s[i]!=0:
        ans.append(s[i])
        break
for j in range(i):
    ans.append(0)
for k in range(i+1,len(s)):
    ans.append(s[k])
print(ans)
if ans==ss:
    print("OK")
else:
    print("WRONG_ANSWER")

n = input()
m = input()
mint = int(m)

shifts = []
for i in range(0,len(n)):
    if n[i] != '0':
        shifts.append(n[i:]+n[:i])

for j in range(0,len(shifts)):
    shifts[j] = int(shifts[j])

answer = min(shifts)
if answer == mint:
    print('OK')
else:
    print('WRONG_ANSWER')

a = raw_input()
b = raw_input()

z = a.count('0')*'0'
u = a.count('1')*'1'
d = a.count('2')*'2'
t = a.count('3')*'3'
q = a.count('4')*'4'
c = a.count('5')*'5'
s = a.count('6')*'6'
e = a.count('7')*'7'
o = a.count('8')*'8'
n = a.count('9')*'9'

tup = [u,d,t,q,c,s,e,o,n]
tup.sort()
tup.insert(1,z)
c = ""
for x in range(len(tup)):
	c = c + tup[x]

if (c==b):
	print "OK"
else:
	print "WRONG_ANSWER"

n=raw_input()
mini=(1<<31)-1
for i in range(len(n)):
	if n[i]!='0':
		mini=min(mini,int(n[i:]+n[:i]))
if mini==int(raw_input()):
	print 'OK'
else:
	print 'WRONG_ANSWER'

import sys
import itertools

no = raw_input()
ans = raw_input()
l = len(no)
orignans = ans
ans = ans[-l::1]
if int(ans[0])==0 or len(orignans)!=l:
	print "WRONG_ANSWER"
	sys.exit()

smallest = int(no)

for permut in itertools.permutations(no, l):
	#permut = "".join(list(permut))
	if permut[0]!="0":
		permut = int("".join(list(permut)))
		if permut<smallest:
			smallest = permut
#print "Smallest: ", smallest
if int(orignans)==smallest:
	print "OK"
else:
	print "WRONG_ANSWER"

d=raw_input()
x=int(raw_input())
m=''
res=''
result=''
for i in range(0,len(d)):
    m=m+" "+d[i:i+1]

m=m[1:len(m)]
m=m.split()
k=0
for i2 in range(0,len(m)):

    m[i2]=int(m[i2])
    if(m[i2]==0):
        k=k+1

m=sorted(m)
if(len(m)==1)&(m[0]==0):
    k=9
    res=0
for i in range(0,len(m)):
    m[i]=str(m[i])
if(k==1):
    res=m[1]+m[0]
    for i in range(2,len(m)):
        res=res+m[i]

if(k==2):
    res=m[2]+m[1]+m[0]
    for i in range(3,len(m)):
        res=res+m[i]
if(k==3):
    res=m[3]+m[2]+m[1]+m[0]
    for i in range(4,len(m)):
        res=res+m[i]
if(k==4):
    res=m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(5,len(m)):
        res=res+m[i]
if(k==5):
    res=m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(6,len(m)):
        res=res+m[i]
if(k==6):
    res=m[6]+m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(7,len(m)):
        res=res+m[i]
if(k==7):
    res=m[7]+m[6]+m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(8,len(m)):
        res=res+m[i]
if(k==8):
    res=res[8]+m[7]+m[6]+m[5]+m[4]+m[3]+m[2]+m[1]+m[0]
    for i in range(9,len(m)):
        res=res+m[i]
if(k==0):
    for i in range(0,len(m)):
        res=res+m[i]
res=int(res)
if(res==x):
    print("OK")
if(res!=x):
    print("WRONG_ANSWER")

a = raw_input()
b = raw_input()

z = a.count('0')*'0'
u = a.count('1')*'1'
d = a.count('2')*'2'
t = a.count('3')*'3'
q = a.count('4')*'4'
c = a.count('5')*'5'
s = a.count('6')*'6'
e = a.count('7')*'7'
o = a.count('8')*'8'
n = a.count('9')*'9'

tup = [u,d,t,q,c,s,e,o,n]
result = ''
first = True
for x in range(len(tup)):
	if(first and tup[x] != '' and z != ''):
		result = result + tup[x][0] + z
		result = result + tup[x][1:]
		first = False
	else:
		result = result + tup[x]

if (result==b ):
	print 'OK'
else:
	print 'WRONG_ANSWER'

n=raw_input()
mini=(1<<31)-1
digits=[0]*10
for x in n:
	digits[int(x)]+=1
for i in range(1,10):
	if digits[i]!=0:
		break
mini=str(i)+'0'*digits[0]
digits[i]-=1
while i<10:
	mini+=str(i)*digits[i]
	i+=1
if mini==raw_input():
	print 'OK'
else:
	print 'WRONG_ANSWER'

import collections
num1=input()
num2=input()
inp=[int(i) for i in num1]
outp=[int(i) for i in num2]
numbers=[0]*10#нулевая - число нулей, первая - число единиц, вторая - число двоек и т д
numbers_out=[0]*10
unique_nums=0
for i in range(len(inp)):
    numbers[inp[i]]+=1
    if numbers[inp[i]]==1:
        unique_nums+=1
    if i<len(outp):
        numbers_out[outp[i]]+=1
ans=True
if collections.Counter(numbers)!=collections.Counter(numbers_out):
    ans=False
if len(inp)!=len(outp):
    ans=False
have_been=set()
def min_set(a):
    a1=a.copy()
    if 0 in a1:
        a1.remove(0)
    if len(a1)>0:
        return min(a1)
    else:
        return -1
for i in outp:
    if numbers[i]==0:
        ans=False
    if i>0 and i<min_set(have_been):
        ans=False
    if len(have_been)>0:
        if i<max(have_been):
            ans=False
    if i==0 and len(have_been)!=1:
        ans=False
    have_been.add(i)
    numbers[i]-=1
if ans:
    print('OK')
else:
    print('WRONG_ANSWER')

class A:

    def rotate_keypad(self, keypad):
        reversed_rows = list(reversed(keypad))
        return ["".join(list(reversed(x))) for x in reversed_rows]

    def solve(self):
        keypad = [input(), input(), input()]
        if keypad == self.rotate_keypad(keypad):
            print("YES")
        else:
            print("NO")

class B:

    def solve(self):
        alice = input()
        bob = int(input())

        from itertools import permutations

        smallest = int(alice)
        if smallest != 0:
            for perm in permutations(alice):
                if int("".join(list(perm))) < smallest and \
                   not "".join(list(perm)).startswith("0"):
                    smallest = int("".join(list(perm)))

        if smallest < bob:
            print("WRONG_ANSWER")
        else:
            print("OK")

B().solve()

num1=input()
num2=input()
inp=[int(i) for i in num1]
outp=[int(i) for i in num2]
numbers=[0]*10#нулевая - число нулей, первая - число единиц, вторая - число двоек и т д
unique_nums=0
for i in inp:
    numbers[i]+=1
    if numbers[i]==1:
        unique_nums+=1
ans=True
have_been=set()
def min_set(a):
    a1=a.copy()
    if 0 in a1:
        a1.remove(0)
    if len(a1)>0:
        return min(a1)
    else:
        return -1
for i in outp:
    if numbers[i]==0:
        ans=False
    if i>0 and i<min_set(have_been):
        ans=False
    if i==0 and len(have_been)!=1:
        ans=False
    have_been.add(i)
    numbers[i]-=1
if ans:
    print('OK')
else:
    print('WRONG_ANSWER')

n=int(input())
m=int(input())
r=n
# print(r)
arr=[]
while r!=0:
    s=r%10
    # print(s)
    arr.append(s)
    r=r//10
arr1=arr[::-1]
arr1.sort()
# print(arr1)
count=0
for i in range(0,len(arr)):
    if arr1[i]==0:
        count+=1
    else:
        break
if count>0:
    t=arr1[0]
    arr1[0]=arr1[count]
    arr1[count]=t
s=0
# print(arr1)
for i in range(0,len(arr1)):
    s=s*10+arr1[i]
print(s)
if s==m:
    print("OK")
else:
    print("WRONG_ANSWER")

l=list(input())
m=int(input())
l.sort()

e=0
if(l[0]=='0'):
    for i in range(1,len(l)):
        if(l[i]!='0'):
            l[0]=l[i]
            l[i]='0'
            e=1
            break
        if(e==1):
            break
n=int("".join(l))
if(n==m):
    print('OK')
else:
    print('WRONG_ANSWER')

import sys
from itertools import product

file = sys.stdin
#file = open("test", "r")
p = map(int, list(file.readline().rstrip()))
p.sort()
for i in range(len(p)):
    if p[i] != 0:
        temp = p.pop(i)
        p.insert(0, temp)
        break

ans =  "".join(map(str, p))
bro = file.readline().rstrip()
if ans == bro:
    print "YES"
else:
    print "NO"

n = list(input())
m = input()

if len(n) > 1:

	n.sort()
	if n[0] == '0':
		ans = n[1]
		ans += str(n[0])+''.join(n[2:])
	else:
		ans = ''.join(n)
else:
	ans = n

#print(ans)
if ans == m :
	print("OK")
else:
	print("WRONG_ANSWER")

import sys
import math

n = sys.stdin.readline()
m = sys.stdin.readline()
l = len(n) - 1
k = [0] * 10

res = 0
for i in range(l):
    k[int(n[i])] += 1

z = []
for i in range(1, 10):
    if(k[i] != 0):
        z.append(str(i))
        k[i] -= 1
        break

z.extend("0" * k[0])

for i in range(1, 10):
    if(k[i] != 0):
        z.extend(str(i) * k[i])

if(int(n) == 0 and len(m) - 1 != 1):
    print("WRONG_ANSWER")
    exit()

if(int("".join(z)) == int(m)):
    print("OK")
else:
    print("WRONG_ANSWER")

a = raw_input()
b = raw_input()

z = a.count('0')*'0'
u = a.count('1')*'1'
d = a.count('2')*'2'
t = a.count('3')*'3'
q = a.count('4')*'4'
c = a.count('5')*'5'
s = a.count('6')*'6'
e = a.count('7')*'7'
o = a.count('8')*'8'
n = a.count('9')*'9'

tup = [u,d,t,q,c,s,e,o,n]
result = ''
first = True
for x in range(len(tup)):
	if(first and tup[x] != '' and z != ''):
		result = result + tup[x][0] + z
		result = result + tup[x][1:]
		first = False
	else:
		result = result + tup[x]

if(first):
	result = z

if (result==b ):
	print 'OK'
else:
	print 'WRONG_ANSWER'

n=int(input())
ans=int(input())
n1=str(n)
n1=list(n1)
if n==0:
    print('OK' if n==ans else 'WRONG_ANSWER')
elif '0' not in n1:
    ans1=''.join(sorted(n1))
    if int(ans1)==ans:
        print('OK')
    else:
        print('WRONG_ANSWER')
else:
    ans1=sorted(n1)
    c=ans1.count('0')
    ans1=[i for i in ans1 if i!='0']
    for i in range(c):
        ans1.insert(1,'0')
    ans1=''.join(ans1)
    if int(ans1)==ans:
        print('OK')
    else:
        print('WRONG_ANSWER')

a = raw_input()
b = raw_input()

f = b[0]

if(len(a) == len(b)):
    if(b[0] != "0" and len(b) > 1):
        aux = True
        for i in xrange(1, len(b)):
            if(i == 1):
                if((not (b[i-1] <= b[i])) and b[i] != "0"):
                    aux = False
            elif((not (b[i-1] <= b[i]))):
                aux = False
        if(aux):
            print("OK")
        else:
            print("WRONG_ANSWER")
    elif(len(b) == 0):
        if(b == a):
            print("OK")
        else:
            print("WRONG_ANSWER")
    else:
        print("WRONG_ANSWER")
else:
    print("WRONG_ANSWER")

c=[0]*10
for x in input():
    c[ord(x)-ord('0')]+=1
t=[]
t.append(c[1]*'1')
t.append(c[0]*'0')
for i in range(2,10):
    if c[i]==0:
        continue
    t.append(c[i]*chr(ord('0')+i))
s=input()
if s[0]!='0' and s==''.join(t):
    print('OK')
else:
    print('WRONG_ANSWER')

n, shuffled = sorted([int(d) for d in input()]), int(input())
zeros = n.count(0)
n = n[zeros:zeros+1] + [0] * zeros + n[zeros+1:]
print("OK") if int("".join(map(str, n))) == shuffled else print("WRONG_ANSWER")

import sys
import itertools

no = raw_input()
ans = raw_input()
l = len(no)
orignans = ans
ans = ans[-l::1]
#if int(ans[0])==0:
#	print "WRONG_ANSWER"
#	sys.exit()

smallest = int(no)

for permut in itertools.permutations(no, l):
	#permut = "".join(list(permut))
	if permut[0]!="0":
		permut = int("".join(list(permut)))
		if permut<smallest:
			smallest = permut
#print "Smallest: ", smallest
if int(orignans)==smallest:
	print "OK"
else:
	print "WRONG_ANSWER"

s=input()
t=input()

x=[]
for i in range(10):
    x += [s.count(str(i))]

ans = ""
for i in range(1, 10):
    if x[i]:
        ans += str(i)
        x[i] -= 1

for i in range(10):
    ans += str(i) * x[i]

print("OK" if ans==t else "WRONG_ANSWER")

a = raw_input()
b = raw_input()

z = a.count('0')*'0'
u = a.count('1')*'1'
d = a.count('2')*'2'
t = a.count('3')*'3'
q = a.count('4')*'4'
c = a.count('5')*'5'
s = a.count('6')*'6'
e = a.count('7')*'7'
o = a.count('8')*'8'
n = a.count('9')*'9'

tup = [u,d,t,q,c,s,e,o,n]
result = ""
first = True
for x in range(len(tup)):
	if(tup[x] != '' and first):
		result = result + tup[x] + z
		first = False
	else:
		result = result + tup[x]

if (result==b and b[0] != '0'):
	print "OK"
else:
	print "WRONG_ANSWER"

n = input()
m = input()
mint = int(m)

shifts = []
for i in range(0,len(n)):
    if n[i] != '0':
        shifts.append(n[i:]+n[:i])

for j in range(0,len(shifts)):
    shifts[j] = int(shifts[j])

answer = min(shifts)
if answer == mint:
    print('OK')
else:
    print('WRONG_ANSWER')

b=str(input())
lu=int(input())
if int(b)<10:
        z=int(b)

else:
        a=[]*len(b)
        lo=0
        for i in range (0,len(b)):
                a.append(int(b[i]))

        for k in range (1,len(a)):
                for t in range (len(a)-k):
                        if (a[t])>(a[t+1]):
                                p=(a[t])
                                a[t]=(a[t+1])
                                a[t+1]=p

        g=0
        while a[0]==0:
                a.remove(0)
                g=g+1
        z=a[0]
        if len(a)==1:
                z=int(b)
        else:
                del a[0]
                q=str(a[0])
                for i in range (1,len(a)):
                        q+=""+str(a[i])
                z=str(z)+str(0)*g+q
                z=int(z)

if lu==z:
        print("OK")
else:
        print("WRONG_ANSWER")

n = raw_input()
m = raw_input()
n = sorted(n)
s = ""
for i in n:
    if i != 0:
        s += i
        n.remove(i)
        break
for i in n:
    s += i
if s == m:
    print "OK"
else:
    print "WRONG_ANSWER"

n = input()
m = input()
mzeros = 0
for i in range(0,len(m)):
    if m[i] != '0':
        mzeros = i
        break
m = m[mzeros:]
ndigits = []
for i in n:
    ndigits.append(i)

snd = sorted(ndigits)
numberofzeros = 0
for i in range(0,len(snd)):
    if snd[i] != '0':
        numberofzeros = i
        break
numberofones = 0
for i in range(numberofzeros,len(snd)):
    if snd[i] != '1':
        numberofones = i-numberofzeros
        break
if snd[len(snd)-1] == '1':
    numberofones = len(snd)-numberofzeros
otherdigits = snd[numberofzeros+numberofones:]
if numberofones >= 1:
    answer = '1'+'0'*numberofzeros+'1'*(numberofones-1)
    for j in otherdigits:
        answer = answer+j
else:
    answer = snd[numberofzeros]+'0'*numberofzeros
    for j in otherdigits[1:]:
        answer = answer+j

if n == '0':
    for i in range(1,11):
        if m == '0':
            print('OK')
        else:
            print('WRONG_ANSWER')
elif m == answer:
    print('OK')
else:
    print('WRONG_ANSWER')

a = list(raw_input())
b = list(raw_input())

if a[0] == '0' == b[0] and len(b) == 1:
	print "OK"

else:
	if b[0] == '0':
		print "WRONG_ANSWER"
		exit()

	b.sort()
	a.sort()

	if a == b:
		print "OK"

	else:
		print "WRONG_ANSWER"

n = input()
m = input()
mzeros = 0
for i in range(0,len(m)):
    if m[i] != '0':
        mzeros = i
        break
m = m[mzeros:]
ndigits = []
for i in n:
    ndigits.append(i)

snd = sorted(ndigits)
numberofzeros = 0
for i in range(0,len(snd)):
    if snd[i] != '0':
        numberofzeros = i
        break
numberofones = 0
for i in range(numberofzeros,len(snd)):
    if snd[i] != '1':
        numberofones = i-numberofzeros
        break
if snd[len(snd)-1] == '1':
    numberofones = len(snd)-numberofzeros
otherdigits = snd[numberofzeros+numberofones:]
if numberofones >= 1:
    answer = '1'+'0'*numberofzeros+'1'*(numberofones-1)
    for j in otherdigits:
        answer = answer+j
else:
    answer = snd[numberofzeros]+'0'*numberofzeros
    for j in otherdigits[1:]:
        answer = answer+j

if n == '0':
    if m == '0':
        print('OK')
    else:
        print('WRONG_ANSWER')

elif m == answer:
    print('OK')
else:
    print('WRONG_ANSWER')

s = str(raw_input())
ss = str(raw_input())
n = len(s)
flg = True
s = sorted(s)
i = 0
if s[i]=='0':
    ind = 0
    while i<n and s[i]=='0':
        i+=1
    if i<n:
        s[ind],s[i] = s[i],s[ind]
        flg = True
    else:
        flg = False
if flg:
    s = ''.join(s)
    if s==ss:
        print "OK"
    else:
        print "WRONG_ANSWER"
else:
    if s==ss:
        print "OK"
    else:
        print "WRONG_ANSWER"

n = input()  # ���� �����
k = input()  # ����� ������
l1 = len(n)
l2 = len(k)

# ����� ����������� ���������
a = [0]*10

if (k[0] == '0') or (l2 > l1):
    print('WRONG_ANSWER')
else:
    for i in range(l1):
        a[int(n[i])] += 1
    # �������������, ������ ����� ��������� ���������� �����:
    # ������� ��� ������, ����� 0, ����� 0, ����� ���������
    s = ''

    pos = 1
    while (pos < 10) and (a[pos] == 0):
        pos += 1

    if pos != 10:
        s += str(pos)+'0'*a[0]
        a[pos] -= 1
        for i in range(pos, 10):
            s += str(i)*a[i]
        # ������������� ������

        if s == k:
            print('OK')
        else:
            print('WRONG_ANSWER')

    else:
        print('WRONG_ANSWER')

IN = lambda: raw_input()
a, b = IN(), IN()

if b[0] == '0':
    print 'WRONG_ANSWER'
else :
    a = sorted(a)
    if a[0] == '0':
        LL = len(a)
        for i in xrange(LL):
            if a[i] != '0':
                a[0] = a[i]; a[i]='0'
                break
    ss =""
    for i in a:
        ss += i
    a = ss
    print 'OK' if cmp(a, b)==0 else 'WRONG_ANSWER'

n = input()
m = input()
mzeros = 0
for i in range(0,len(m)):
    if m[i] != '0':
        mzeros = i
        break
m = m[mzeros:]
ndigits = []
for i in n:
    ndigits.append(i)

snd = sorted(ndigits)
numberofzeros = 0
for i in range(0,len(snd)):
    if snd[i] != '0':
        numberofzeros = i
        break
numberofones = 0
for i in range(numberofzeros,len(snd)):
    if snd[i] != '1':
        numberofones = i-numberofzeros
        break
if snd[len(snd)-1] == '1':
    numberofones = len(snd)-numberofzeros
otherdigits = snd[numberofzeros+numberofones:]
if numberofones >= 1:
    answer = '1'+'0'*numberofzeros+'1'*(numberofones-1)
    for j in otherdigits:
        answer = answer+j
else:
    answer = snd[numberofzeros]+'0'*numberofzeros
    for j in otherdigits[1:]:
        answer = answer+j

if n == '0':
    for i in range(1,11):
        if m == '0'*i:
            print('OK')
elif m == answer:
    print('OK')
else:
    print('WRONG_ANSWER')

s=input()
s1=(input())
n=len(s)
w=[]
d=0
for i in range(0,n):
    w.append(int(s[i]))
w.sort()
for i in range(0,n):
    if(w[i]!=0):
        q=i
        d=d+1
        break
if(d==0):
    print("WRONG_ANSWER")
    exit(0)
else:
    s2=str(w[q])
for i in range(0,n):
    if(i!=q):
        s2=s2+str(w[i])
if(s2==s1 and int(s)>0):
    print("OK")
else:
    print("WRONG_ANSWER")

a = raw_input()
b = raw_input()
s = list(a)
s.sort()
if (s[0]=='0'):
	for i in xrange(len(a)):
		if (s[i]>'0'):
			t = s[i]
			s[i] = '0'
			s[0] = t
			break
print ("WRONG_ANSWER","OK")[''.join(a) == b]

n,s = input(), str(int(input()));
b = n;
n=list(n);
n.sort();
if len(n)>1:
    for x in n:
        if x!='0':
            ans=x;
            break;
    n.remove(ans);
    n.insert(0, ans);
n=''.join(n);
print(['WRONG_ANSWER','OK'][n==s and b>n]);

s = raw_input();
t = raw_input();

flag = 1;
for i in range(len(s)):
	if s.count(s[i]) != t.count(s[i]):
		flag = 0; break;
#print flag
pos = 0

if t[0] == '0':
	flag = 0;
if flag:
	for i in range(pos+1, len(t)):
		if t[i] == '0' and i == pos+1:
			continue;
		if t[i] < t[i-1]:
			flag = 0; break;
print "OK" if flag else "WRONG_ANSWER";

n =int(input())
m =int(input())
t=""
if(int(n)==0):
    if(m==0): print("OK")
    else: print("WRONG_ANSWER")
else:
    n=str(n)
    n=sorted(n)
    for i in n:
        if(i!='0'):
            t+=i
            break
    for i in range(10):
        l = n.count(str(i))
        if(t[0]==str(i)): l-=1
        for j in range(l):
            t+= str(i)
    if(t==str(m)): print("OK")
    else: print("WRONG_ANSWER")

a = input()
n = [0] * 10

for x in a:
    y = int(x)
    n[y] += 1

first = False
res = ''
for i, x in enumerate(n[1:]):
    if x:
        if not first:
            res = str(i + 1) * x + '0' * n[0]
            first = True
        else:
            res += str(i + 1) * x
if res == input():
    print('OK')
else:
    print('WRONG_ANSWER')

l=list(input())
m=int(input())
l.sort()

e=0
if(l[0]=='0'):
    for i in range(1,len(l)):
        if(l[i]!='0'):
            l[0]=l[i]
            l[i]='0'
            e=1
            break
        if(e==1):
            break
n=int("".join(l))

if(n==m and n!=0):
    print('OK')
else:
    print('WRONG_ANSWER')

first =list(input())# получаем список с строковыми элементами  ['3', '3', '1', '0']
second = input()
first_reverse = sorted(first) # переворачивам
if first_reverse[0] == "0": # если первый элемент 0, то перебираем дальше список, пока не найдем отличный от 0 элемент
	for i in first_reverse:
		if i != "0":
			y =first_reverse.index(i)# получаем индекс первого отличного от нуля элемента
			first_reverse[0],first_reverse[y] = first_reverse[y],first_reverse[0]# меняем местами значения, без помози буферной пер
			break
result = ''.join(first_reverse)# соединяем элементы воедино
#print(result)
if result == second:#сравниваем и выводим
	print("OK")
else: print("ERROR")

class CodeforcesTask12BSolution:
    def __init__(self):
        self.result = ''
        self.number = 0
        self.solution = 0

    def read_input(self):
        self.number = int(input())
        self.solution = int(input())

    def process_task(self):
        try:
            if len(str(self.solution)) > 1 and str(self.solution)[0] == "0":
                self.result = "WRONG_ANSWER"
            else:
                cnts = [0] * 10
                for c in str(self.number):
                    cnts[int(c)] += 1
                start = min([int(x) for x in str(self.number) if int(x)])
                cnts[start] -= 1
                res = [start]
                for x in range(10):
                    res += [x] * cnts[x]
                real_result = int("".join([str(x) for x in res]))
                self.result = "OK" if real_result == self.solution else "WRONG_ANSWER"
        except ValueError:
            self.result = "WRONG_ANSWER"

    def get_result(self):
        return self.result

if __name__ == "__main__":
    Solution = CodeforcesTask12BSolution()
    Solution.read_input()
    Solution.process_task()
    print(Solution.get_result())