Harryxun/stf_run huggingface dataset:
k,x,y = map(int,input().split())

if x%k>>0 :
    if x<= (x/k+1)*k <=y :
        print('OK')
    else:
        print('NO')
else:
    print('OK')





### FIXED CODE ###

k= int(input())
x,y = map(int,input().split())
if 1<=x<=y<=1000 and 1<=k<=1000:
    pass



    if x%k>>0 :
        if x<= (x//k+1)*k <=y :
            print('OK')
        else:
            print('NG')
    else:
        print('OK')

else:
    print('NG')
x=int(input())
y=int(input())
z=int(input())
left=x-y
// Input
print(left%z)


### FIXED CODE ###

total = int(input())
cake = int(input())
donut = int(input())
money = total - cake
while money >= donut:
    money = money - donut
print(money)
A,B=map(int.input().split())

print(A*B-A-B+1)

### FIXED CODE ###

A,B=map(int,input().split())

print(A*B-A-B+1)
# coding: utf-8
n=int(input())
data=list(map(int,input().split()))
ans=1
def check(index,v=0):
    global data
    global ans
    if index+1<len(data):
        if data[index]==data[index+1]:
            check(index+1,v)
        elif data[index]<data[index+1]:
            if v==1 or v==0:
                check(index+1,1)
            else:
                ans+=1
                check(index+1,0)
        else:
            if v==-1 or v==0:
                check(index+1,-1)
            else:
                ans+=1
                check(index+1,0)
check(0)
print(ans)

### FIXED CODE ###

# coding: utf-8
n=int(input())
data=list(map(int,input().split()))
index=0
ans=1
v=0
while index<len(data):
    if index+1<len(data):
        if data[index]==data[index+1]:
            pass
        elif data[index]<data[index+1]:
            if v==1 or v==0:
                v=1
            else:
                ans+=1
                v=0
        else:
            if v==-1 or v==0:
                v=-1
            else:
                ans+=1
                v=0
    index+=1
print(ans)
import sys
import numpy as np
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
X, Y, A, B, C = [int(x) for x in input().strip().split()]
p = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:X]
q = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:Y]
r = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:min(C, X+Y)]

pi, qi, ri = X-1, Y-1, 0
tp, tq, tr = p[pi], q[qi], r[ri]
ans = 0
while pi >= 0 or qi >= 0:
    if tp >= tr and  tq >= tr:
        break
    elif tp < tr and tq < tr:
        if tp < tq:
            p[pi] = r[ri]
            pi -= 1
            ri += 1
        else:
            q[qi] = r[ri]
            qi -= 1
            ri += 1
    elif tp < tr or tq < tr:
        if tp < tr:
            p[pi] = r[ri]
            ri += 1
            pi -= 1
            tp = p[pi]
        else:
            q[qi] = r[ri]
            ri += 1
            qi -= 1
            tq = q[qi]
    else:
        break

print(sum(p)+sum(q))

### FIXED CODE ###

import sys
import numpy as np
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
X, Y, A, B, C = [int(x) for x in input().strip().split()]
p = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:X]
q = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:Y]
r = np.array(sorted([int(x) for x in input().strip().split()], reverse=True))[:min(C, X+Y)]

pq = np.hstack((p, q))
pq.sort()
ri = 0
for i, t in enumerate(pq):
    if t < r[ri]:
        pq[i] = r[ri]
        ri += 1
    if ri == len(r):
        break
print(sum(pq))
n=int(input())
h=list(map(int,input().split()))
dp=[0]*n
dp[0]=0
dp[1]=abs(h[1]-h[0])
dp[2]=min(abs(h[1]-h[0]),abs(h[2]-h[0]))
for i in range(2,n):
    dp[i]=min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2]))
print(dp[n-1])


### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
dp=[0]*n
dp[0]=0
dp[1]=abs(h[1]-h[0])
for i in range(2,n):
  dp[i]=min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2]))
print(dp[n-1])
n=int(input())
t=input()
ans=t[0]
for i in range(1,n):
    if ans[-1]==i:
        pass
    else:
        ans=ans+i
print(len(ans))

### FIXED CODE ###

n=int(input())
t=input()
ans=t[0]
for i in range(1,n):
    if ans[-1]==t[i]:
        pass
    else:
        ans=ans+t[i]
print(len(ans))
A, B = map(int, input().split())
S = input()
C = "1234567890"
if S[A] == "-":
  for i in range(len(S)):
    if i != A-1:
      if A[i] in C:
        continue
      else:
        print("No")
        exit()
else:
  print("No")
  exit()
print("Yes")

### FIXED CODE ###

def resolve():
    A, B = map(int, input().split())
    S = input()
    C = "1234567890"
    for i in range(A):
        if S[i] in C:
            continue
        else:
            print("No")
            exit()
    if S[A] != "-":
        print("No")
        exit()
    for i in range(A+1, len(S)):
        if S[i] in C:
            continue
        else:
            print("No")
            exit()
    print("Yes")
resolve()
def neighbor(N, edges):
    neighbor_list = [[] for _ in range(N)]
    for a, b in edges:
        neighbor_list[a-1] += [b-1]
        neighbor_list[b-1] += [a-1]
        
    return neighbor_list

def paint(N, K, nlist, clist, p2c, combi):
    p2c_next = {}
    for parent in p2c:
        for children in p2c[parent]:
            # childrenに対し、Kからparentの塗られている近接の数を引いた数だけ組み合わせを掛ける
            combi *= (K - 1 - len([t for t in nlist[parent - 1] if clist[t - 1]]))
            clist[children - 1] = True #子供の頂点を塗る
        # 次の世代のリスト
            p2c_next.update({children:[gc for gc in nlist[children - 1] if gc != parent]})
            
    return clist, p2c_next, combi

def paint2(K, nlist, now_num, from_num, case_num):
        mod = 1000000007
        
        if now_num == 0:
            can_use_color = K - 1
        else:
            can_use_color = K - 2
        
        if len(nlist[now_num]) > can_use_color and len(nlist[now_num]) != 1:
            return 0
        
        for child in nlist[now_num]:
            if child == from_num:
                continue
            else:
                case_num *= can_use_color
                can_use_color -= 1
                case_num %= mod
        
        for child in nlist[now_num]:
            if child == from_num:
                continue
            else:
                case_num = paint2(K, nlist, child, now_num, case_num)
        return case_num%mod
            

if __name__ == '__main__':
    N, K = map(int, input().split())
    edges = [None]*(N-1)
    
    for i in range(N-1):
        edges[i] = list(map(int, input().split()))
    
    nlist = neighbor(N, edges)
    
    print(paint2(K, nlist, 0, -1, K))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

def neighbor(N, edges):
    neighbor_list = [[] for _ in range(N)]
    for a, b in edges:
        neighbor_list[a-1] += [b-1]
        neighbor_list[b-1] += [a-1]
        
    return neighbor_list


def paint(K, nlist, now_num, from_num, case_num):
        mod = 1000000007
        if  from_num == -1:
            can_use_color = K - 1
        else:
            can_use_color = K - 2
        
        if len(nlist[now_num]) - 1 > can_use_color:
            return 0
        
        for child in nlist[now_num]:
            if child == from_num:
                continue
            else:
                case_num *= can_use_color
                can_use_color -= 1
                case_num %= mod
        
        for child in nlist[now_num]:
            if child == from_num:
                continue
            else:
                case_num = paint(K, nlist, child, now_num, case_num)
        return case_num%mod
            

if __name__ == '__main__':
    N, K = map(int, input().split())
    edges = [None]*(N-1)
    
    for i in range(N-1):
        edges[i] = list(map(int, input().split()))
    
    nlist = neighbor(N, edges)


    print(paint(K, nlist, 0, -1, K))
l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
]
print(l[int(input())])


### FIXED CODE ###

l=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
]
n=int(input())
print(l[n-1])
a = input()
b = input()
if a>=b:
    print('{}'.format((a+b)/2))
else :
    print('{}'.format((b-a)/2))

### FIXED CODE ###

a = int(input())
g = int(input())

print('{}'.format((2*g-a)))
n = int(input())
a = list(map(int, input().split()))

a_d = []
for i in range(1, n+1):
    a_d.append(a[i-1]-i)

d = (list(np.absolute(a_d)))
d.sort()
m = d[int(n/2)]

print(abs(sum(d-m)))


### FIXED CODE ###

n = int(input())

if n % 2 == 0:
    print(n)
else:
    print(n*2)
n = int(input())
if n <= 999:
    print(ABC)
else:
    print(ABD)

### FIXED CODE ###

n = int(input())
if n <= 999:
    print("ABC")
else:
    print("ABD")
import sys
A,B,K = map(int,input().split())

if B-A+1 <= K * 2:
    for i in range(A,B+1):
            print(i)
    else:
        sys.exit(0)


for i in range(A,A+K): #AからB
    print(i)

for i in range(B-K+1,B+1):
    print(i)


### FIXED CODE ###

import sys
S = input()
abc = list("abc")

for i in range(len(abc)):
    if abc[i] in S:
        continue
    else :
        print("No")
        sys.exit(0)

print("Yes")
X, Y = map(int, input().split())

for i in range(X+1):
    for j in range(X+1):
        if(i+j > X):
            continue

        if(Y == 4*i+2*j):
            print("Yes")
            exit()

print("No")


### FIXED CODE ###

x = list(map(int, input().split()))

for count, i in enumerate(x):
    if(i == 0):
        print(count+1)
N, M = map(int,input().split())

ans = K * ((K-1) ** (N-1))

### FIXED CODE ###

N, K = map(int,input().split())
print(K * ((K-1) ** (N-1)))
s = raw_input()

k = int(raw_input())

n = len(s)
bruh = {}
for i  in range(1, n + 1): # length
	for j in range( n - ( i - 1)): # start 
		bruh[s[j: j + i:]] = 0
another = bruh.keys()
another = sorted(another)
print(another[k - 1])

### FIXED CODE ###

def calc( s , k , n):

	bruh = {}
	for i  in range(1, k + 1): # length
		for j in range( n - ( i - 1)): # start 
			bruh[s[j: j + i:]] = 0
	another = bruh.keys()
	another = sorted(another)
	print( another[k - 1])

s = input()

k = int(input())

n = len(s)
 
calc( s , k , n)
import numpy as np

h, w = map(int, input().split(' '))
a = [input() for _ in range(h)]
d = [[float('inf') for _ in range(w)] for _ in range(h)]
move = [(1, 0), (-1, 0), (0, 1), (0, -1)]

que = []
for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            d[i][j] = 0
            if (i + 1 < h and a[i+1][j] == '.') or (i - 1 >= 0 and a[i-1][j] == '.') or (j + 1 < w and a[i][j+1] == '.') or (j - 1 >= 0 and a[i][j-1] == '.'):
                que.append((i, j))


while len(que) > 0:
    y, x = que.pop(0)

    for dy, dx in move:
        ny = y + dy
        nx = x + dx

        if (ny >= 0 and ny < h) and (nx >= 0 and nx < w) and a[ny][nx] == '.' and d[ny][nx] == float('inf'):
            d[ny][nx] = d[y][x] + 1
            if (ny + 1 < h and a[ny + 1][nx] == '.') or (ny - 1 >= 0 and a[ny - 1][nx] == '.') or (nx + 1 < w and a[ny][nx + 1] == '.') or (nx - 1 >= 0 and a[ny][nx - 1] == '.'):
                que.append((ny, nx))

print(np.max(d))


### FIXED CODE ###

import numpy as np


def solve():
    h, w = map(int, input().split(' '))
    max_value = h + w
    values = []
    for i in range(h):
        values.append([0 if i == '#' else max_value for i in list(input())])
    values = np.array(values)

    for x in range(w - 1):
        values[:, x+1] = np.minimum(values[:, x] + 1, values[:, x+1])
    for x in range(w - 1, 0 , -1):
        values[:, x-1] = np.minimum(values[:, x-1], values[:, x] + 1)
    for x in range(h - 1):
        values[x+1, :] = np.minimum(values[x, :] + 1,values[x+1, :])
    for x in range(h - 1, 0, -1):
        values[x-1, :] = np.minimum(values[x, :] + 1, values[x-1, :])
    print(np.max(values))


solve()
def main():
    N = int(input())

    i = 0
    S = []
    while i < N:
        S.append(sorted(list(str(input()))))
        i += 1

    i = 0
    while i < N - 1:
        s = set(S[i]) & set(S[i+1])
        i += 2

    ans = []
    for a in s:
        i = 0
        x = []
        while i < N:
            x.append(S[i].count(a))
            i += 1
        n = min(x)
        ans.append(a * n)

    ans.sort()
    print(''.join(ans))

main()


### FIXED CODE ###

import sys

def main():
    N = int(input())

    i = 0
    S = []
    while i < N:
        S.append(list(str(input())))
        i += 1
    if N == 1:
        ans = sorted(S[0])
        print(''.join(ans))
        sys.exit()

    i = 0
    while i < N - 1:
        sset = set(S[i]) & set(S[i+1])
        i += 2

    ans = []
    for a in sset:
        i = 0
        n = []
        while i < N:
            n.append(S[i].count(a))
            i += 1
        small = min(n)
        ans.append(a * small)

    ans.sort()
    print(''.join(ans))

main()
def main():
  a,b,c = map(lambda x: int(x), input().split())
  k = int(input())
 
  for _ in range(k):
      if b <= a:
          b = 2 * b
          continue
      if c <= b:
          c = 2 * c
          continue
      print('Yes')
      return
 
  if (a < b) & (b < c):
      print('Yes')
      return
  print('No')
 
if __name__ == '__main__':
    main()

### FIXED CODE ###

print(10 - int(input())//200)
f=lambda a:any(all(b)for b in a)or all(a[i][i]for i in(0,1,2))   
a=eval('list(map(int,input().split())),'*3)
exec('b=int(input());a=[[u*(u!=b)for u in t]for t in a];'*int(input()))
a=[[not u for u in t]for t in a]
print('NYoe s'[f(a)|f(t[::-1]for t in zip(*a))::2])

### FIXED CODE ###

f=lambda a:any(all(b)for b in a)|all(a[i][i]for i in(0,1,2))   
a=eval('list(map(int,input().split())),'*3)
exec('b=int(input());a=[[u*(u!=b)for u in t]for t in a];'*int(input()))
a=[[not u for u in t]for t in a]
print('NYoe s'[f(a)|f([t[::-1]for t in zip(*a)])::2])
N,K=list(map(int,input().split()))
A=list(map(int,input().split()))

INF=float("inf")

dp=[INF]*N

for i in range(0, N-1):
  for k in range(1, K+1):
    if i+k <= N-1:
      dp[i+k]=min(dp[i+k],dp[i]+abs(A[i]-A[i+k])
print(dp[N-1])


### FIXED CODE ###

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

def solve():
    """ dp[i+k]を求める方法
    TLE 
    """
    N,K=list(map(int,input().split()))
    A=list(map(int,input().split()))
    
    INF=float("inf")
    
    dp=[INF]*N
    dp[0]=0
    
    for i in range(0, N-1):
        for k in range(1, K+1):
            if i+k <= N-1:
                dp[i+k]=min(dp[i+k],dp[i]+abs(A[i]-A[i+k]))
            else:
                break
    print(dp[N-1])


def solve2():
    """dp[i]を求める方法
    """
    N,K=list(map(int,input().split()))
    A=list(map(int,input().split()))
    
    INF=float("inf")
    
    dp=[INF]*N
    dp[0]=0
    for i in range(1, N):
        for k in range(1, K+1):
            if i-k >= 0:
                dp[i] = min(dp[i], dp[i-k]+abs(A[i]-A[i-k]))
            else:
                break
    print(dp[N-1])


if __name__ == "__main__":
    solve2()
N,M=map(int,input().split())
PY=[]
for i in range(M):
    array=list(map(int,input().strip().split()))
    PY.append(array)

PY.sort()
city=0
order=0
for i in range(M):
    newcity=PY[i][0]
    if(newcity!=city):
        city=newcity
        order=1
    strcity=str(PY[i][0])
    strorder=str(order)
    upper='0'*(6-len(strcity))+strcity
    lower='0'*(6-len(strorder))+strorder
    order=order+1
    print(upper+lower)

### FIXED CODE ###

X,Y=map(int,input().split())
print(X+int(Y/2))
S = input()
S[0:3]="2017"
print(S)

### FIXED CODE ###

S = list(input())
S[3] = "8"
print("".join(S))
n,q=map(int,input().split())
s=list(str(input()))
l=[]
r=[]
ans=0
x=[]
for i in range(q):
  l1,r1=map(int,input().split())
  l.append(l1)
  r.append(r1)

for j in range(0,q):
  for k in range(l[j],r[j]):
    if s[k]=="A" and s[k+1]=="C":
      ans+=1
    else:
      ans+=0
  x.append(ans)
  ans=0
  
for m in range(0,q):
  print(x[m])
      
      
      
  
  
  
  


### FIXED CODE ###

n,q=map(int,input().split())
s=list(str(input()))
l=[]
r=[]
ans=0
x=[0]
for i in range(q):
  l1,r1=map(int,input().split())
  l.append(l1)
  r.append(r1)

for j in range(0,n-1):
  if s[j]=="A" and s[j+1]=="C":
    ans+=1
    x.append(ans)
  else:
    x.append(ans)

for k in range(0,q):
  print(x[r[k]-1]-x[l[k]-1])
N, K = map(int, input().split())

for i in range(N):
    if 2**i > N:
        a = i-1
        b = N - 2**a
        break
for j in range(K):
    if 2**j > K:
        c = j-1
        d = K - 2**c
        break

if N <= K:
    print((2**(2*a-c+1)+2**(-c)+3*2**(a-c+1)*b)/3*N)
else:
    print((2**(c+1)+2**(-c)+3*2*b)/*3N + (N-K+1)/N)

### FIXED CODE ###

N, K = map(int, input().split())
S = input()

if K == 1:
    S = S[0].lower() + S[1:]
elif K == N:
    S = S[:-1] + S[N-1].lower()
else:
    S = S[:K-1] + S[K-1].lower() + S[K:]
print(S)
D=int(input())
if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
elif D == 22:
    pribt('Christmas Eve Eve Eve')

### FIXED CODE ###

D = int(input())
if D == 25:
    print('Christmas')
elif D == 24:
    print('Christmas Eve')
elif D == 23:
    print('Christmas Eve Eve')
elif D == 22:
    print('Christmas Eve Eve Eve')
def main():
    n, m = map(int, input().split())
    s = [0] * n
    c = [0] * n
    for i in range(m):
        s[i], c[i] = map(int, input().split())
    ans = list()
    for i in range(n):
        ans.append(0)
    for i in range(m):
        if n != 1 and s[i] == 1 and c[i] == 0:
            print(-1)
            exit()
        if ans[s[i]-1] == 0:
            ans[s[i]-1] = c[i]
        if ans[s[i]-1] == c[i]:
            continue
        else:
            print(-1)
            exit()
    if n == 3:
        if ans[0] == 0:
            ans[0] = 1
        print(*ans, sep='')

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    s = [0] * m
    c = [0] * m
    for i in range(m):
        s[i], c[i] = map(int, input().split())
    ans = list()
    for i in range(n):
        ans.append(0)
    for i in range(m):
        if n != 1 and s[i] == 1 and c[i] == 0:
            print(-1)
            exit()
        if ans[s[i]-1] == 0 or ans[s[i]-1] == c[i]:
            ans[s[i]-1] = c[i]
        elif ans[s[i]-1] != 0 and ans[s[i]-1] != c[i]:
            print(-1)
            exit()
    if n != 1:
        if ans[0] == 0:
            ans[0] = 1
        print(*ans, sep='')
    else:
        print(*ans, sep='')

if __name__ == '__main__':
    main()
a = int(input())
b = []
for _ in range(a):
  b.append(sorted(list(input())))

for i in range(a):
  for j in range(i+1, a):
    check = True
    for k in range(10):
      if b[i] != b[j]:
        check = False
    if check = True:
      ans += 1
print(ans)

### FIXED CODE ###

a = int(input())
b = {}
strings = ''
ans = 0

for i in range(a):
    check = True
    strings = ''.join(sorted(list(input())))
    if strings not in b.keys():
      check = False
      b[strings] = 1
    if check == True:
      ans += b[strings]
      b[strings] += 1

print(ans)
N = int(input())
import numpy as np

A = list(map(int, input().split()))
dp = np.zeros((N,N), dtype=np.int32)
for i in range(N):
  tmp = [0]*(A[i]-1)+[1]+[0]*(N-A[i])
  tmp = np.array(tmp, dtype=np.int32)
  dp[i] = tmp+dp[i-1]

dp = np.array(dp)
ans = []
for i in range(N):
  if i > 0 and i < N-1:
    tmp = dp[N-1] - dp[i] + dp[i-1]
    tmp = tmp*(tmp-1)//2
    tmp = tmp[tmp>0]
    ans.append(tmp.sum(dtype=np.int32))
  if i == 0:
    tmp = dp[N-1] - dp[i]
    tmp = tmp*(tmp-1)/2
    tmp = tmp[tmp>0]
    ans.append(tmp.sum(dtype=np.int32))
  if i == N-1:
    tmp = dp[N-2]
    tmp = tmp*(tmp-1)/2
    tmp = tmp[tmp>0]
    ans.append(tmp.sum(dtype=np.int32))
for i in ans:
  print(i)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

from collections import defaultdict
c = defaultdict(int)
cm = set()
c2 = list()
num = 0
for i in range(N):
  c[A[i]] += 1
  cm.add(A[i])
for i in list(cm):
  num += c[i]*(c[i]-1)//2
for i in range(N):
  ans = num - c[A[i]] + 1
  c2.append(ans)

for cs in c2:
  print(cs)
N = int(input())
A = [int(i) for i in input().split()]

counts = [0]*9

for i in A:
    counts[int(i/400)] += 1

#print(counts)

v = 8 - counts[:-1].count(0)

if counts[-1] == 0:
    print(v,v)
else:
    if v == 0:
        print(1,counts[-1])
    else :
        print(v,v+counts[-1])    




### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]

counts = [0]*9

for i in A:
    color = int(i/400)
    if color > 8:
        color = 8
    counts[color] += 1

#print(counts)

v = 8 - counts[:-1].count(0)

if counts[-1] == 0:
    print(v,v)
else:
    if v == 0:
        print(1,counts[-1])
    else :
        print(v,v+counts[-1])
import sys
import collections
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K,Q=nm()
Al=[0]*N
for i in range(Q):
    Al[i]=ni()



for i in range(N):
    print('No' if (K-Q+Al.count(i+1)<1) else 'Yes')

### FIXED CODE ###

import sys
import collections
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K,Q=nm()
Al=[0]*Q
ans_l=[K-Q]*N
for i in range(Q):
    #Al[i]=int(input())
    ans_l[int(input())-1]+=1
    


for i in range(N):
    #print(Al.count(i+1))
    #print('No' if (K-Q+Al.count(i+1)<1) else 'Yes')
    print('No' if (ans_l[i]<1) else 'Yes')
import sys
from decimal import Decimal

def main():
    for input_line in sys.stdin:
        input_line = raw_input()
        x1 = int(input_line.split(' ')[0])
        y1 = int(input_line.split(' ')[1])
        p = int(input_line.split(' ')[2])
        x2 = int(input_line.split(' ')[3])
        y2 = int(input_line.split(' ')[4])
        q = int(input_line.split(' ')[5])
        multiplicand1, multiplicand2 = calculate1(x1, x2)
        after_y1, after_y2, after_p, after_q = calculate2(y1, y2, p, q, multiplicand1, multiplicand2)
        calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p)
    
def calculate1(x1, x2):
    if (x1 >= 0 and x2 >= 0) or (x1 < 0 and x2 < 0):
        multiplicand1 = -x2
        multiplicand2 = x1
        return multiplicand1, multiplicand2
    else:
        multiplicand1 = abs(x2)
        multiplicand2 = abs(x1)
        return multiplicand1, multiplicand2
    
def calculate2(y1, y2, p, q, multiplicand1, multiplicand2):
    after_y1 = y1 * multiplicand1
    after_y2 = y2 * multiplicand2
    after_p = p * multiplicand1
    after_q = q * multiplicand2
    return after_y1, after_y2, after_p, after_q

def calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p):
    y = Decimal(after_p + after_q) / Decimal(after_y1 + after_y2)
    x = Decimal(p - y1 * y) / Decimal(x1)
    print('%.4f %.4f' % (x, y))
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
from decimal import Decimal

def main():
    for input_line in sys.stdin:
        x1 = int(input_line.split(' ')[0])
        y1 = int(input_line.split(' ')[1])
        p = int(input_line.split(' ')[2])
        x2 = int(input_line.split(' ')[3])
        y2 = int(input_line.split(' ')[4])
        q = int(input_line.split(' ')[5])
        multiplicand1, multiplicand2 = calculate1(x1, x2)
        after_y1, after_y2, after_p, after_q = calculate2(y1, y2, p, q, multiplicand1, multiplicand2)
        calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p)
    
def calculate1(x1, x2):
    if (x1 >= 0 and x2 >= 0) or (x1 < 0 and x2 < 0):
        multiplicand1 = -x2
        multiplicand2 = x1
        return multiplicand1, multiplicand2
    else:
        multiplicand1 = abs(x2)
        multiplicand2 = abs(x1)
        return multiplicand1, multiplicand2
    
def calculate2(y1, y2, p, q, multiplicand1, multiplicand2):
    after_y1 = Decimal(y1 * multiplicand1)
    after_y2 = Decimal(y2 * multiplicand2)
    after_p = Decimal(p * multiplicand1)
    after_q = Decimal(q * multiplicand2)
    return after_y1, after_y2, after_p, after_q

def calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p):
    y = Decimal(after_p + after_q) / Decimal(after_y1 + after_y2)
    y = round(y, 3)
    x = Decimal(p - y1 * y) / Decimal(x1)
    x = round(x, 3)
    print('%.3f %.3f' % (x, y))
    
if __name__ == '__main__':
    main()