Harryxun/stf_run huggingface dataset:
import itertools
import math

def solve():
    N, D = [int(s) for s in input().split() if s]
    X = []
    cnt = 0
    for _ in range(N):
        X.append([int(s) for s in input().split() if s])
    for x1,x2 in itertools.combinations(X,2):
        if dist(x1,x2).is_integer():
            cnt+=1
    print(cnt)
    
solve()

### FIXED CODE ###

import itertools
import math

dist = lambda X,Y: math.sqrt(sum((x-y)**2 for x,y in zip(X,Y)))

def solve():
    N, D = [int(s) for s in input().split() if s]
    X = []
    cnt = 0
    for _ in range(N):
        X.append([int(s) for s in input().split() if s])
    for x1,x2 in itertools.combinations(X,2):
        if dist(x1,x2).is_integer():
            cnt+=1
    print(cnt)

solve()
N, M = map(int, input().split())

S, C = [], []
for _ in range(N):
    a, b = map(int, input().split())
    S.append((a, b))

for _ in range(M):
    c, d = map(int, input().split())
    C.append((c, d))

for a, b in S:
    ans = None
    min_dist = int(2e8)
    for i, (c, d) in enumerate(C):
        dist = abs(c - a) + abs(d - b)
        if dist < min_dist:
            min_dist = dist
            ans = i
    print(ans + 1)

### FIXED CODE ###

N, M = map(int, input().split())

S, C = [], []
for _ in range(N):
    a, b = map(int, input().split())
    S.append((a, b))

for _ in range(M):
    c, d = map(int, input().split())
    C.append((c, d))

for a, b in S:
    ans = None
    min_dist = 1 << 32
    for i, (c, d) in enumerate(C):
        dist = abs(c - a) + abs(d - b)
        if dist < min_dist:
            min_dist = dist
            ans = i
    print(ans + 1)
if C < D:
    if st[A:C].find('##') >= 0 or st[B:D].find('##') >= 0:
        print('No')
    else:
        print('Yes')
else:
    # Cの方がおおきいケース 入れ替わる
    if st[A:C].find('##') >= 0:
        print('No')
    else:
        fnd = st.find('...', B-1, D+1)
        if fnd >= 0:
            print('Yes')
        else:
            print('No')

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def SI(): return input()

N,A,B,C,D=LI()
st=input()

if C < D:
    if st[A:C].find('##') >= 0 or st[B:D].find('##') >= 0:
        print('No')
    else:
        print('Yes')
else:
    # Cの方がおおきいケース 入れ替わる
    if st.find('##', A-1, C) >= 0:
        print('No')
    else:
        fnd = st.find('...', B-2, D+1)
        if fnd >= 0:
            print('Yes')
        else:
            print('No')
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(a):
  s+=1/i
print(1/s)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
s=0
for i in a:
  s+=1/i
print(1/s)
from collections import deque
import copy

def makeList(splist,n):
    for i in range(n):
        springs=[]
        springs.append(splist[i*2:i*2+2])
        springs.append(i)
        yield springs

def isSafe(wfs,safe):
    while len(wfs)>0:
        flog=wfs.popleft()
        flogArea=[]
        spn=flog[1]+1

        for i in range(-1,2):
            for j in [-2,2]:
                dx=flog[0][0]+j
                dy=flog[0][1]+i
                if dx>=0 and dx<10 and dy>=0 and dy<10:
                    flogArea.append([[dx,dy],spn])
        for j in range(-1,2):
            for i in [-2,2]:
                dx=flog[0][0]+j
                dy=flog[0][1]+i
                if dx>=0 and dx<10 and dy>=0 and dy<10:
                    flogArea.append([[dx,dy],spn])
        
        for i in range(len(safe[spn])):
            if safe[spn][i] in flogArea:
                if spn==9:
                    return True
                if spn<9:
                    wfs.append(safe[spn][i])
    return False

while True:
    fx,fy=map(int,input().split())
    if fx==0 and fy==0:
        break
    n=int(input())
    splist=list(map(int,input().split()))
    safe=[]
    k=makeList(splist,n)
    for spring in k:
        temp=[]
        for i in range(-1,2):
            for j in range(-1,2):
                dw=spring[0][0]+i
                dh=spring[0][1]+j
                if dw>=0 and dw<10 and dh>=0 and dh<10:
                    temp.append([[dw,dh],spring[1]])
        safe.append(temp)

    wfs=deque()
    first=[[fx,fy],-1]
    wfs.append(first)

    if isSafe(wfs,safe):
        print("OK")
    else:
        print("NA")


### FIXED CODE ###

from collections import deque
 
jumps = [
    [1, -2], [0, -2], [-1, -2], [-2, -1], [-2, 0], [-2, 1], [-1, 2], [0, 2], [1, 2], [2, -1], [2, 0], [2, 1]
]
 
def bfs(ipy, ipx, ys, xs, n):
    q = deque()
    q.append([ipy, ipx, -1])
    while q:
        py, px, t = q.popleft()
        if t == n-1:
            return True
 
        for dy, dx in jumps:
            npy = py + dy
            npx = px + dx
            if npy in range(10) and npx in range(10) and abs(npy - ys[t+1]) <= 1 and abs(npx - xs[t+1]) <= 1:
                q.append([npy, npx, t+1])
 
    return False
 
if __name__ == '__main__':
    while True:
        try:
            ipx, ipy = map(int, input().split())
            if ipx == 0 and ipy == 0:
                break
            n = int(input())
            l = list(map(int, input().split()))
            xs = l[::2]
            ys = l[1::2]
             
            if bfs(ipy, ipx, ys, xs, n):
                print('OK')
            else:
                print('NA')
        except:
            break
import itertools

n = int(input())

l = [0]*n
for i in range(n):
    s = input()
    if s[0] == "M":
        l[0] += 1
    if s[0] == "A":
        l[1] += 1
    if s[0] == "R":
        l[2] += 1
    if s[0] == "C":
        l[3] += 1
    if s[0] == "H":
        l[4] += 1 

ans = 0
for a,b,c in list(itertools.combinations(l,3)):
    ans += a*b*c

print(ans)    

### FIXED CODE ###

import itertools

n = int(input())

l = [0]*5
for i in range(n):
    s = input()
    if s[0] == "M":
        l[0] += 1
    if s[0] == "A":
        l[1] += 1
    if s[0] == "R":
        l[2] += 1
    if s[0] == "C":
        l[3] += 1
    if s[0] == "H":
        l[4] += 1 

ans = 0
for a,b,c in itertools.combinations(l,3):
    ans += a*b*c

print(ans)
n,m=map(int,input().split())
wa=0
ac=0
check = [0]*n
for _ in range(m):
	a, b = input().split()
    i = int(a)
	if check[i]==0:
		if b == "WA":
			wa+=1
		elif b == "AC":
			ac+=1
			check[i]=1
print(ac,wa)

### FIXED CODE ###

N, M = map(int, input().split())

ac = [False] * N
wa = [0] * N
for _ in range(M):
    p, S = input().split()
    p = int(p) - 1
    if S == 'AC':
        ac[p] = True
    else:
        if not ac[p]:
            wa[p] += 1

a = 0
b = 0
for i in range(N):
    if ac[i]:
        a += 1
        b += wa[i]
print(*[a, b])
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    n, q = map(int, readline().split())
    s = readline().rstrip().decode()
    ac = []    
    cnt = 0
    for i in range(1, n+1):
        if (s[i-1] == 'A') and (s[i] == 'C'):
            cnt += 1
            ac.append(cnt)
        else:
            ac.append(cnt)
    query = []
    for _ in range(q):
        l, r = map(int, readline().split())
        l -= 1
        r -= 1
        print(ac[r]-ac[l])
if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    n, q = map(int, readline().split())
    s = readline().rstrip().decode()
    ac = [0]    
    cnt = 0
    for i in range(1, n):
        if (s[i-1] == 'A') and (s[i] == 'C'):
            cnt += 1
            ac.append(cnt)
        else:
            ac.append(cnt)
    query = []
    for _ in range(q):
        l, r = map(int, readline().split())
        l -= 1
        r -= 1
        print(ac[r]-ac[l])
if __name__ == '__main__':
    main()
s = input()
k = int(input())
cnt = 0
flag = 0
for i in range(len(s)-1):
  if s[i] == s[i+1]:
    cnt += 1
    if s[i+1] == s[i+2] and flag == 0 :
      flag = 1
      cnt -= 1
    else:
      flag = 0
print(cnt*k)

### FIXED CODE ###

from itertools import groupby

s = input()
k = int(input())
a = [sum(1 for _ in g) for _, g in groupby(s)]
if len(a) == 1:
  print(len(s) * k // 2)
else:
  ans = sum(x // 2 for x in a) * k
  if s[0] == s[-1] and a[0] & a[-1] & 1:
    ans += k - 1
  print(ans)
S = S + 'E'   # 終端処理
ans = -1    # 答えの初期値（十分に小さい値）

# 立った人の連続の数
if (S[0] == '0'):
    stand = 1
else:
    stand = 0

L = 0
R = 0

# 尺取り法
while (R < N):
    # 右端を進めることが可能（立った人の連続の数がK以下）なら、右端を進める
    if (stand <= K):
        # 立った人の連続の数が増えるなら1足す
        if (S[R] == '1' and S[R + 1] == '0'):
            stand += 1
        # 答えの更新
        ans = max(ans, R - L + 1)
        R += 1
    # 進められない場合、左端と右端が同じなら両者を進める
    # 左端が右端を追い越さないための処理
    """
    """
    elif (L == R):
        L += 1
        R += 1
    # それ以外は左端のみを進める
    else:
        # 立った人の連続の数が減るなら1減らす
        if (S[L] == '0' and S[L + 1] == '1'):
            stand -= 1
        L += 1
        # 左端のみを進めた場合は答えを更新し得ない
    

print(ans)

### FIXED CODE ###

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

S = S + 'E'   # 終端処理
ans = -1    # 答えの初期値（十分に小さい値）

# 立った人の連続の数
if (S[0] == '0'):
    stand = 1
else:
    stand = 0

L = 0
R = 0

# 尺取り法
while (R < N):
    # 右端を進めることが可能（立った人の連続の数がK以下）なら、右端を進める
    if (stand <= K):
        # 立った人の連続の数が増えるなら1足す
        if (S[R] == '1' and S[R + 1] == '0'):
            stand += 1
        # 答えの更新
        ans = max(ans, R - L + 1)
        R += 1
    # 進められない場合、左端と右端が同じなら両者を進める
    # 左端が右端を追い越さないための処理
    elif (L == R):
        L += 1
        R += 1
    # それ以外は左端のみを進める
    else:
        # 立った人の連続の数が減るなら1減らす
        if (S[L] == '0' and S[L + 1] == '1'):
            stand -= 1
        L += 1
        # 左端のみを進めた場合は答えを更新し得ない

print(ans)
def resolve():
	n = int(input())
	v = []
	for _ in range(n):
		v.append(list(map(int, input().split())))
	t, a = 1, 1
	for i in range(n):
		tv, av = v[i]
		c = max(math.ceil(t/tv), math.ceil(a/av))
		t, a = c*tv, c*av
	print(t+a)
resolve()

### FIXED CODE ###


def resolve():
	n = int(input())
	v = []
	for _ in range(n):
		v.append(list(map(int, input().split())))
	t, a = 1, 1
	for i in range(n):
		tv, av = v[i]
		c = max(t//tv + (t%tv!=0), a//av + (a%av!=0))
		t, a = c*tv, c*av
	print(t+a)
resolve()
X=map(int,input().split())
X.sort()
if X==[5,5,7]:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

X=list(map(int,input().split()))
X.sort()
if X==[5,5,7]:
  print('YES')
else:
  print('NO')
n,m = tuple(map(int,input()))

check = [0]*m

for i in range(n):
  for a_i in tuple(map(int,input()))[1:]:
    check[a_i]+=1
    
print(check.count(n))

### FIXED CODE ###

n,m = tuple(map(int,input().split()))

check = [0]*m

for i in range(n):
  for a_i in tuple(map(int,input().split()))[1:]:
    check[a_i-1]+=1
    
print(check.count(n))
import numpy

### FIXED CODE ###

n, m = map(int, raw_input().split())
 
a = [[0]*m for i in xrange(n)]
 
b = [0]*m
 
for i in xrange(n):
    tmp = map(int, raw_input().split())
    for j in xrange(m):
        a[i][j] = tmp[j]
for i in xrange(m):
    b[i] = input()
for i in xrange(n):
    tmp = 0
    for j in xrange(m):
        tmp += a[i][j] * b[j]
    print tmp
N,M=map(int,input().split())
d=[[] for i in range(N)]
for i in range(M):
    x,y=map(int,input().split())
    d[x-1].append(y-1)

scores=[]
def depth(now,score):
    global scores
    if d[now]:
        for i in d[now]:
            depth(i,score+1)
    else:
        scores.append(score)
Max=0
for i in range(N):
    depth(i,0)
    if max(scores)>Max:
        Max=max(scores)
    scores.clear()
print(Max)

### FIXED CODE ###

import numpy as np
import sys
sys.setrecursionlimit(100000)
N,M=map(int,input().split())
d=[[] for i in range(N)]
for i in range(M):
    x,y=map(int,input().split())
    d[x-1].append(y-1)
dp=[0 for i in range(N)]

def depth(now,score,d):
    global dp
    if dp[now]==0 or not(dp[now]):
        if d[now]:
            _score=[]
            for i in d[now]:
                _score.append(depth(i,score+1,d)-score)
            dp[now]=max(_score)
        else:
            return score

        return dp[now]+score

    else:
        return dp[now]+score



Max=0
for i in range(N):
    m=depth(i,0,d)
    if  m>Max:            
        Max=m
print(Max)
N = int(input())
h = list(map(int,input().split()))

dp = [-1 for i in range(N)]

dp[0] = 0
dp[1] = abs(h[0]-h[1])
for i in range(N-2):
    dp[i+2] = max(dp[i+1] + abs(h[i+1]-h[i+2]), dp[i] + abs(h[i] - h[i+2])
print(dp[N-1])

### FIXED CODE ###

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

a=[0]*N
a[1] = abs(h[0]-h[1])

for i in range(2,N):
    a[i]=min(a[i-2]+abs(h[i-2]-h[i]),a[i-1]+abs(h[i-1]-h[i]))

print(a[N-1])
n, m, x = map(int, input().split())
C = [0] * n
A = [[] for i in range(n)]
for i in range(n):
    c = list(map(int, input().split()))
    C[i], A[i] = c[0], c[1:]

INF = 10 ** 9
ans = INF

for bit in range(0, 1 << n):
    cost = 0
    flag = True
    tmp = [0] * m
    for i in range(n):
        if bit & 1 << i:
            cost += C[i]
            for j in range(m):
                tmp[j] += A[i][j]
    for i in range(n):
        if tmp[i] < x:
            flag = False
    if flag:
        ans = min(ans, cost)

print(-1 if ans == INF else ans)

### FIXED CODE ###

n, m, x = map(int, input().split())
C = [0] * n
A = [[] for i in range(n)]
for i in range(n):
    c = list(map(int, input().split()))
    C[i], A[i] = c[0], c[1:]

INF = 10 ** 9
ans = INF

for bit in range(0, 1 << n):
    cost = 0
    flag = True
    tmp = [0] * m
    for i in range(n):
        if bit & 1 << i:
            cost += C[i]
            for j in range(m):
                tmp[j] += A[i][j]
    for i in range(m):
        if tmp[i] < x:
            flag = False
    if flag:
        ans = min(ans, cost)

print(-1 if ans == INF else ans)
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
Z = []
for _ in range(M):
  B, C = map(int, input().split())
  [Z.append(C) for _ in range(B)]
Z.sort(reverse=True)
for i in range(N):
  if Z[i] > A[i]:
      A[i] = Z[i]
  else:
    break
print(sum(A))  

### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int, input().split()))
ans = 0
pool = []
[pool.append((a, 1)) for a in A]
for _ in range(M):
  b, c = (map(int, input().split()))
  pool.append((c, b))
pool.sort(reverse=True, key=lambda x:x[0])

while N>0:
  for p in pool:
    if p[1] >= N:
      ans += p[0]*N
      N = 0
    if p[1] < N:
      ans += p[0]*p[1]
      N -= p[1]

print(ans)
import sys

A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if V == W:
  print('NO')
  sys.exit()
t= (B-A)%(V-W)
if t == 0 abs(B-A)//(V-W) <= T::
  print('YES')
else:
  print('NO')
  

### FIXED CODE ###

import sys

A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if V <= W:
  print('NO')
  sys.exit()
if 0 < abs((B-A))/(V-W) <= T:
  print('YES')
else:
  print('NO')
from itertools import accumulate
from collections import Counter
n = int(input())
nums = list(map(int,input().split()))
s = [0]+list(accumulate(nums))
ans = 0
for i in Counter(S).values():
    if i > 1:
        ans += i * (i - 1) // 2
print(ans)

### FIXED CODE ###

from itertools import accumulate
from collections import Counter
n = int(input())
nums = list(map(int,input().split()))
s = [0]+list(accumulate(nums))
ans = 0
for i in Counter(s).values():
    if i > 1:
        ans += i * (i - 1) // 2
print(ans)
def main():
    n,m,c = tuple([int(t)for t in input().split()])
	b = tuple([int(t)for t in input().split()])
    
    ans = 0
    for _ in [0]*n:
      	t = tuple([int(t)for t in input().split()])
        v = c
		for i in range(m):
            v+=b[m]*t[m]
        if v>0:
          ans+=1
    print(ans)
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n,m,c = tuple([int(t)for t in input().split()])
    b = tuple([int(t)for t in input().split()]) 
    ans = 0
    for _ in [0]*n:
      t = tuple([int(t)for t in input().split()])
      v = c
      for i in range(m):
        v+=b[i]*t[i]
      if v>0:
          ans+=1
    print(ans)
if __name__ == "__main__":
    main()
import sys
n=int(input())
w=[input() for i in range(n)]
if all(w[j][len(w[j])]==w[j+1][0] for j in range(n-1)) and len(set(w))==n:
  print('Yes')
  sys.exit()
print('No')

### FIXED CODE ###

import sys
n=int(input())
w=[input() for i in range(n)]
if all(w[j][len(w[j])-1]==w[j+1][0] for j in range(n-1)) and len(set(w))==n:
  print('Yes')
  sys.exit()
print('No')
N = input()
A = input()
 
if (N-A) % 500 == 0:
  print("Yes")

else:
  print("No")


### FIXED CODE ###

N = int(input())
A = int(input())
 
if  A >= (N%500):
  print("Yes")
else:
  print("No")
n = int(input())
a = list(map(int,input().split()))
import sys
import math
import functools
g = functools.reduce(math.gcd,a)

num = 10**2   
li = [0]*num
for k in a:
    if li[k-1]==0:
        li[k-1] += 1
    else:
        if k-1!=0:
            print("not coprime")
            sys.exit()

i=2
while i<=num:
    #print([li[k*i-1] for k in range(1,num//i+1)])
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys,exit()


if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")
sys.exit()

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
import sys

num = 10**6
li = [0]*num
for k in a:
    li[k-1] += 1

i=2
while i<=num:
    if sum([li[k*i-1] for k in range(1,num//i+1)])>1:
        break
    i+=1
else:
    print("pairwise coprime")
    sys.exit()

import math
import functools
g = functools.reduce(math.gcd,a)
if g==1:
    print("setwise coprime")
    sys.exit()

print("not coprime")
import sys
lines = sys.stdin.readlines()
n = int(lines[0])
arr = list(map(int, lines[1].split(' ')))

maxi = 62
mod = int(1e9) + 7
ones = [0 for _ in range(maxi)]
for num in arr:
    for idx, val in enumerate(range(maxi)):
        ones[idx] += (num >> idx ) & 1

ans = 0
for idx, val in enumerate(ones):
    ans += ((pow(2, idx) % mod) * (((n - val)%mod) * (val%mod))) % mod

    ans %= mod

print(ans)

### FIXED CODE ###

x = sum(list(map(int, input().split(' '))))
if x >= 22:
  print('bust')
else:
  print('win')
S=str(input())
M=len(S)
list=[]
i=0
for i in range(N-2):
  list.append(S[i:i+3])
  i+=1
N=len(list)
new_list=[]
j=0
for j in range(N):
  new_list.append(abs(int(list[j])-753))
print(min(new_list))


### FIXED CODE ###

S=str(input())
M=len(S)
list=[]
i=0
for i in range(M-2):
  list.append(S[i:i+3])
  i+=1
N=len(list)
new_list=[]
j=0
for j in range(N):
  new_list.append(abs(int(list[j])-753))
print(min(new_list))
def ex_value(dice):
  return (1+dice)/2
def main():
  n,k = map(int, input().split())
  list_p = list(map(int, input().split()))
  list_ex_val = list(map(ex_value, list_p))
  print(max([sum(list_ex_val[i:i+k]) for i in range(n-k+1)]))
     
if __name__ == '__main__':
  main()

### FIXED CODE ###

s,t = map(str, input().split())
a,b = map(int, input().split())
u = str(input())

if s == u:
    print(a-1, b)
else:
    print(a, b-1)
(n,),*xy = [list(map(int, s.split())) for s in open(0)]

from collections import Counter
from itertools import combinations
c = Counter()
for (xa,ya),(xb,yb) in combinations(xy,2):
    c[(xa-xb, ya-yb)] += 1
    c[(xb-xa, yb-ya)] += 1

print(n - max(c.values()))

### FIXED CODE ###

(n,),*xy = [list(map(int, s.split())) for s in open(0)]

from collections import Counter
from itertools import combinations
from sys import exit

if n == 1:
    print(1)
    exit()

c = Counter()

for (xa,ya),(xb,yb) in combinations(xy,2):
    c[(xa-xb, ya-yb)] += 1
    c[(xb-xa, yb-ya)] += 1

print(n - max(c.values()))
N, M = list(int, input().split())

print(int(N * (N - 1) / 2 + M * (M - 1) / 2))


### FIXED CODE ###

N, M = map(int, input().split())

print(int(N * (N - 1) / 2 + M * (M - 1) / 2))
# coding: utf-8
# Your code here!
s=input()
K=int(input())

ans=[]
#122
for item in s[:len(s)-1]:
    cost=(123-ord(item))
    if K>=cost:
        K-=cost
        ans.append("a")
    else:
        ans.append(item)

last=ord(s[-1])
if last+K>122:
    ans.append(chr(last+K-26))
else:
    ans.append(chr(last+K))

print("".join(ans))
    

### FIXED CODE ###

s=list(input())
N=int(input())

apple=lambda c:ord(c)-ord("a")+1

l=[]
for i in range(len(s)):
    s[i]=apple(s[i])
    dif=27-s[i]
    if s[i]==1:
        pass
    elif dif<=N:
        N-=dif
        s[i]=1

s[-1]-=1
s[-1]=(s[-1]+N)%26
s[-1]+=1

kiss = lambda c: chr(c+96)
for i in range(len(s)):
    s[i]=kiss(s[i])

print("".join(s))
#! -*- coding:utf-8 -*-
a,b,c = map(int,input().split())

if a % 2 == 0 and b % 2 == 0 and c % 2 == 1:
    print('NO')    
elif a % 2 == 1 and b % 2 == 0 and c %2 == 0:
    print('NO')
elif a == 1:
    print('YES')
elif a % 2 ==0 and b % 2 == 0 and a >= c:
    pritn('NO')
else:
    print('YES')


### FIXED CODE ###

arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
c = arr[2]

flag = False
for k in range(a,b*a+1):
    if (k*a) % b == c:
        flag = True

if flag == True:
    print('YES')
else:
    print('NO')
A,B,K=map(int,input().split())
num=list(range(A,B+1))
num_right=num[:K]
num_left=sorted(num,reverse=True)[:K]
ans=set(num_right+num_left)
for i in ans:
    print(i)


### FIXED CODE ###

A,B,K=map(int,input().split())
if B-A+1-2*K>=0:
    for i in range(A,A+K):
        print(i)
    for i in range(B-K+1,B+1):
        print(i)
else:
    for i in range(A,B+1):
        print(i)
from math import sqrt
n=input()
for i in range(sqrt(n),0,-1):
  if n%i==0:
    j=n//i
    pirnt(i+j-2)
    break

### FIXED CODE ###

from math import sqrt

N = int(input())
for i in range(int(sqrt(N)), 0, -1):
    if N % i == 0:
        j = N // i
        print(i + j - 2)
        break
b=list(input())
a=int(input())
if b[0]=="1":
  print(b[1])
else:
  print(b[0])


### FIXED CODE ###

s=input()
k=int(input())
for i in range(k):
  if s[i]!="1":
    break
print(s[i])
ans = 10**9
N=int(input())
A=list(map(int,input().split()))
for i in A:
    p=0
    while i%2==0:
        i //= 2
        p += 1
    if p<ans:
        ans=p
print(ans)a


### FIXED CODE ###

ans = 10**9
N=int(input())
A=list(map(int,input().split()))
for i in A:
    p=0
    while i%2==0:
        i //= 2
        p += 1
    if p<ans:
        ans=p
print(ans)
import math

N = int(input())

i=0
#桁数
while 10**i<N:
  i=i+1
    


if i==1:
  num=N
elif i==2:
  num=9
elif i==3:
  num=9+N-99
elif i==4:  
  num=9+999-99
elif i==5:  
  num=9+900+N-10000

print(num)

  

### FIXED CODE ###

import math

N = int(input())

i=0
num=0

#桁数
while 10**i <= N:
  i=i+1
    


if i==1:
  num=N
elif i==2:
  num=9
elif i==3:
  num=9+N-99
elif i==4:  
  num=9+999-99
elif i==5:  
  num=9+900+N-9999
elif i==6:  
  num=9+900+99999-9999
  
print(num)
n=int(input())
A=list(map(int, input().split()))


for i in range(n):
    delete=A[i]
    A.pop(i)
    cost=0
    for j in range(n-1):
        if j==0:
            cost+=abs(A[j])
        elif j==n-2:
            cost+=abs(A[j]-A[j-1])+abs(A[j])
        else:
            cost+=abs(A[j]-A[j-1])
    
    print(cost)

### FIXED CODE ###

n=int(input())
A=[0]+list(map(int, input().split()))+[0]

cost=0

for i in range(n+1):
    cost+=abs(A[i+1]-A[i])

for k in range(1, n+1):
    ans=cost+abs(A[k+1]-A[k-1])-(abs(A[k]-A[k-1])+abs(A[k+1]-A[k]))
    print(ans)
n= int(input())

a= list(map(int, input().split(" ")))

k = len(filter(lambda(x, x%4), a))
j = len(filter(lambda(x, x%2), a))-k
i = len(a)-j-k

if (j > 0) and (i+1 <= k):
    print("Yes")
if (j == 0) and (i-1 <= k):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n= int(input())

a= list(map(int, input().split(" ")))

k = len(list(filter(lambda x: x%4 == 0, a)))
j = len(list(filter(lambda x: x%2 == 0, a)))-k
i = len(a)-j-k

if (j > 0) and (i <= k):
    print("Yes")
elif (j == 0) and (i-1 <= k):
    print("Yes")
else:
    print("No")
K, X = [int(i) for i in input().split()]
ans = " ".join([str(i) for i in list(range(X - l, X + l + 1))])
print(ans)


### FIXED CODE ###

K, X = [int(i) for i in input().split()]
l = K - 1
ans = " ".join([str(i) for i in list(range(X - l, X + l + 1))])
print(ans)