Harryxun/stf_run huggingface dataset:
N=int(input())
if N%9==0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

import itertools

H,W,M=[int(i) for i in input().split(" ")]

target=[]
for i in range(M):
    target.append(tuple([int(j)-1 for j in input().split(" ")]))

target=set(target)

tate=[0 for i in range(H)]
yoko=[0 for i in range(W)]
for t in target:
    tate[t[0]]+=1
    yoko[t[1]]+=1



tate_max=max(tate)
yoko_max=max(yoko)

tate_max_ind=[]
for i,t in enumerate(tate):
    if t==tate_max:
        tate_max_ind.append(i)

yoko_max_ind=[]
for i,y in enumerate(yoko):
    if y==yoko_max:
        yoko_max_ind.append(i)

for iter in itertools.product(tate_max_ind,yoko_max_ind):
    if (iter in target)==False:
        print(tate_max+yoko_max)
        break

else:
    print(tate_max+yoko_max-1)
b=input()
a=['A','C','G','T']
b=['A','T','C','G']
i=a.index(b)
print(b[i])

### FIXED CODE ###

b=input()
a=['A','C','G','T']
c=['T','G','C','A']
i=a.index(b)
print(c[i])
#! /usr/bin/env python3
# -*- coding: utf-8 -*-

N = int(input())
if sum([int(x) for x in input().split()].sort()) > 2*Llist[-1]:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

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

N = int(input())
Llist = [int(x) for x in input().split()]
Llist.sort()
Llist.reverse()
if sum(Llist) > 2*Llist[0]:
    print("Yes")
else:
    print("No")
#入力
input = input()

lst = []
text = ''

#操作
for i in range(len(input)):
   if input[i] == '0':
      text = text + '0'
   elif input[i] == '1':
      text = text + '1'
   elif input[i] = 'B':
      if text != '': #文字列が空でないときのみBS実行
         text = text[:-1]

#出力
print(text)

### FIXED CODE ###

#入力
input = input()

text = ''

#操作
for i in range(len(input)):
   if input[i] == '0':
      text = text + '0'
   elif input[i] == '1':
      text = text + '1'
   elif input[i] == 'B':
      if text != '':
         text = text[:-1]

#出力
print(text)
X = int(input())

for A in range(100):
    for B in range(-50, 50):
        if A**5-B**5 == X:
            print(A, B)
			exit()

### FIXED CODE ###

X = int(input())

for A in range(1000):
    for B in range(-500, 500):
        if A**5-B**5 == X:
            print(A, B)
            exit()
x = int(input())

import bisect

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

primess = primes(x)
index = bisect.bisect_left(primess,x)
print(primess[index])

### FIXED CODE ###

x = int(input())

import bisect

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

primess = primes(100010)
idx = bisect.bisect_left(primess,x)
print(primess[idx])
from scipy.sparse.csgraph import dijkstra
import numpy as np

n, m = map(int, input().split())
e = np.zeros((n, n))
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    e[a][b] = 1
    e[b][a] = 1
dist, predecessor = dijkstra(e, directed=False, return_predecessors=True)

if all(type(v) == np.int32 for v in predecessor[0][1:]):
    print("Yes")
    for v in predecessor[0][1:]:
        print(v + 1)
else:
    print("No")


### FIXED CODE ###

from collections import deque

n, m = map(int, input().split())
e = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    e[a].append(b)
    e[b].append(a)

dist = [1000000] * n
ans = [None]*n
not_visited = set(range(n))
not_visited.remove(0)
vs = deque([0])
dist[0] = 0
while vs:
    v = vs.popleft()
    for other_side in e[v]:
        if other_side in not_visited:
            vs.append(other_side)
            not_visited.remove(other_side)
            if dist[other_side] > dist[v] + 1:
                dist[other_side] = dist[v] + 1
                ans[other_side] = v

print("Yes")
for i in ans[1:]:
    print(i+1)
code = input()
ans = "Bad"
if code[0] == code[1] or code[1] == code[2] or code[2] == code[3] or code[3] == code[4]:
    ans = "Good"
print(ans)

### FIXED CODE ###

code = input()
ans = "Good"
if code[0] == code[1] or code[1] == code[2] or code[2] == code[3]:
    ans = "Bad"
print(ans)
List=[int(j) for j in input().split()]
a=List[1]
b=List[2]

if b>2*a:
    c=b-2*a
    d=c//4
    print(a+d)
else:
    print(b//2)

### FIXED CODE ###

List=[int(j) for j in input().split()]
a=List[0]
b=List[1]

if b>2*a:
    c=b-2*a
    d=c//4
    print(a+d)
else:
    print(b//2)
input = list(map(lambda n: int(n), input().split(' '))
a = input[0]
b = input[1]
x = a * b
y = (a + b) * 2
print("{} {}".format(a, b))

### FIXED CODE ###

input = list(map(lambda n: int(n), input().split(' ')))
print("{} {}".format(input[0] * input[1], (input[0] + input[1]) * 2))
n = int(input())
a = len(str(n))
lst = [[3,5,7]]
tfs = [3,5,7]
for i in range(1,a):
    l = []
    for v in lst[i-1]:
        for t in tfs:
            l.append(int(str(v) + str(t)))
    lst.append(l)
s = 0
for l in lst:
    for v in l:
        if is753(v) and v <= n:
            s+=1
print(s)

### FIXED CODE ###

def is753(n):
    if n % 10 != 3 and n % 10 != 5 and n % 10 !=7:
        return False
    exist3 = False
    exist5 = False
    exist7 = False
    a = str(n)
    for i in range (len(a)):
        x = n % 10
        if x == 3 :
            exist3 = True
        elif x == 5 :
            exist5 = True
        elif x == 7 :
            exist7 = True
        else :
            return False
        n = n // 10
    if exist3 and exist5 and exist7:
        return True
    else :
        return False

n = int(input())
a = len(str(n))
lst = [[3,5,7]]
tfs = [3,5,7]
for i in range(1,a):
    l = []
    for v in lst[i-1]:
        for t in tfs:
            l.append(int(str(v) + str(t)))
    lst.append(l)
s = 0
for l in lst:
    for v in l:
        if is753(v) and v <= n:
            s+=1
print(s)
[N, M] = list(map(int, input().split()))
lst_sc = [list(map(int, input().split())) for i in range(M)]

def main(N, M, lst_sc):
    
    numbers = [''] * N
    for sc in lst_sc:

        [s, c] = sc

        if s > N: return -1

        if numbers[s-1] == '':
            numbers[s-1] = str(c)
        elif numbers[s-1] == str(c):
            pass
        else:
            return -1

    if N > 1 and numbers[0] == '0': return -1
    if numbers[1] == '': numbers[1] = '0'
    if numbers[2] == '': numbers[2] = '0'
    
    answer = ''
    for i in range(N):
        answer += numbers[i]
    return int(answer)
    

if __name__ == "__main__":

    answer = main(N, M, lst_sc)
    print(answer)


### FIXED CODE ###

[N, M] = list(map(int, input().split()))
lst_sc = [list(map(int, input().split())) for i in range(M)]

def main(N, M, lst_sc):
    
    numbers = [''] * N
    for sc in lst_sc:

        [s, c] = sc

        if s > N: return -1

        if numbers[s-1] == '':
            numbers[s-1] = str(c)
        elif not numbers[s-1] == str(c):
            return -1
            
    if N > 1 and numbers[0] == '0': return -1
    if N == 1 and numbers[0] == '': return 0
    
    answer = ''
    for i in range(N):
        if numbers[i] == '':
            if i == 0: numbers[i] = '1'
            else     : numbers[i] = '0'
        answer += numbers[i]
    return int(answer)
    

if __name__ == "__main__":

    answer = main(N, M, lst_sc)
    print(answer)
from math import gcd 
n=int(input())
mod = 10**9+7
count = {}

num=0
for _ in range(n):
    a,b = map(int,input().split())
    if a==0 and b==0:
        num+=1
        continue
    if a*b != 0:
        g=gcd(a,b)*(b//abs(b))
    elif a != 0:
        g=a
    else:
        g=b
        
    x=a//g,b//g
    count[x]=count.get(x,0)+1
        
mem=set()
ans=1
for (x,y),z in count.items():
    if (-1*x//abs(x)*y,abs(x)) in mem:
        continue
    mem.add((x,y))
    ans*=pow(2,z)+pow(2,count.get((-1*x//abs(x)*y,abs(x)),0))-1
    ans%=mod

print((ans+num-1)%mod)

### FIXED CODE ###

from math import gcd 
n=int(input())
mod = 10**9+7
count = {}

num=0
for _ in range(n):
    a,b = map(int,input().split())
    if a==0 and b==0:
        num+=1
        continue
    if a*b != 0:
        g=gcd(a,b)*(b//abs(b))
    elif a != 0:
        g=a
    else:
        g=b
        
    l=a//g,b//g
    count[l]=count.get(l,0)+1
        
mem=set()
ans=1
for (x,y),z in count.items():
    if x*y==0:
        k=(y,x)
    else:
        k=(-1*x//abs(x)*y,abs(x))
    if k in mem:
        continue
    mem.add((x,y))
    ans*=(pow(2,z)+pow(2,count.get(k,0))-1)
    ans%=mod

print((ans+num-1)%mod)
pi=3.14159265358979324
m=2**1000
r_=m*float(input())
S=(pi*r_**2)/(m**2)
l=(2*pi*r_)/m
print S,
print l

### FIXED CODE ###

from math import pi
from decimal import Decimal
r=Decimal(str(input()))
p=Decimal(str(pi))
print(str(p*r**2)+" "+str(2*p*r))
N,A,B = map(int,input.split())
print(min(B,N*A))

### FIXED CODE ###

N,A,B = map(int,input().split())
print(min(B,N*A))
A,B,N=map(int,input().split())
result=0
for x in range(0,n+1):
	a=int(A*x/B)-A*int(x/B)
	if a>result:
		result=a
print(result)

### FIXED CODE ###

A,B,N=map(int,input().split())
if B!=1:
	p=(N+1)//B
	result=0
	if p!=0:
		for a in range(1,p+1):
			x=a*B-1
			s=(A*x)//B - A*(a-1)
			if result < s:
				result=s
	else:
		result=A*N//B -A*(N//B)
	print(result)
else:
	print(0)
x = raw_input()
print x**3

### FIXED CODE ###

x = raw_input()
print int(x)**3
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if n > m:
    b += [10**9+1]*(n-m)
elif m > n:
    a += [10**9+1]*(m-n)

t = 0
i, j = 0, 0
ans = 0
while i < n or j < m:
    if a[i] <= b[j]:
        if t + a[i] <= k:
            t += a[i]
            i += 1
        else:
            break
    else:
        if t + b[j] <= k:
            t += b[j]
            j += 1
        else:
            break
    ans += 1

print(ans)


### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
cumsum_a = [0] * (N + 1)
cumsum_b = [0] * (M + 1)

for i in range(1, N + 1):
    cumsum_a[i] = cumsum_a[i - 1] + A[i - 1]

for i in range(1, M + 1):
    cumsum_b[i] = cumsum_b[i - 1] + B[i - 1]

ans = 0
bi = M
for i in range(N+1):
    for j in range(bi, -1, -1):
        t = cumsum_a[i] + cumsum_b[j]
        if t <= K:
            ans = max(ans, i + j)
            bi = j
            break

print(ans)
class unionFind():
	def __init__(self,n):
		self.tree=[-1]*n
	def find(self, x):
        if self.tree[x] < 0:
            return x
        else:
            self.tree[x] = self.find(self.id[x])
            return self.tree[x]
	def union(self,x,y):
		xr=self.find(x)
		yr=self.find(y)
		if xr!=yr:
			if self.tree[xr]<self.tree[yr]:
				self.tree[yr]=xr
			elif self.tree[xr]>self.tree[yr]:
				self.tree[xr]=yr
			else:
				self.tree[xr]-=1
				self.tree[yr]=xr
			return True
		
		return False
def main():
	ans=0
	n,m=map(int,input().split())
	a=unionFind(n)
	li=[x-1 for x in list(map(int,input().split()))]
	for _ in range(m):
		x,y=map(int,input().split())
		a.union(x-1,y-1)
	for x in range(n):
		ans += a.find(x)==a.find(li[x])
	return ans
print(main())


### FIXED CODE ###

from collections import defaultdict
import sys
sdin = sys.stdin.readline

class UnionFind:
    def __init__(self, node:int) -> None:
        self.n = node
        self.par = [i for i in range(self.n)]
        self.rank = [0 for i in range(self.n)]
        
    def find(self, x:int) -> int:
        if x == self.par[x]:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
        
    def unite(self, x:int, y:int) -> bool:
        if self.isSame(x,y):
            #print("x and y has already united")
            return False
        
        rx = self.find(x)
        ry = self.find(y)
        
        if self.rank[rx] < self.rank[ry]:
            self.par[rx] = ry
        else:
            self.par[ry] = rx
            
            if self.rank[rx] == self.rank[ry]:
                self.rank[rx] += 1
                
        return True
    
    def isSame(self, x:int, y:int) -> bool:
        return self.find(x) == self.find(y)

    

        
N, M = map(int, sdin().split())
P = list(map(int, sdin().split()))
XY = []
for i in range(M):
    XY.append(list(map(int, sdin().split())))


root_node = defaultdict(list)

uf = UnionFind(N)
for x,y in XY:
    x -= 1
    y -= 1
    uf.unite(x,y)

for i in range(N):
    uf.find(i)
    
par = uf.par

for i,root in enumerate(par):
    root_node[root].append(i)
    
ans = 0
for node_list in root_node.values():
    num_list = []
    for i in node_list:
        num_list.append(P[i]-1)
    
    ans += len(set(node_list)&set(num_list))
            
print(ans)
(h,w,m),*s=[[*map(int,i.split())]for i in open(0)]
r,c=[0]*-~h,[0]*-~w
for x,y in s:
    r[x]+=1
    c[y]+=1
print((R:=max(r))+(C:=max(c))-(r.count(R)*c.count(C)==sum(r[x]+c[y]==R+C for x,y in s)))


### FIXED CODE ###

#!/usr/bin/env python3
h, w, m = map(int, input().split())
r = [0] * (h + 1)
c = [0] * (w + 1)
s = []
for _ in range(m):
    x, y = map(int, input().split())
    r[x] += 1
    c[y] += 1
    s.append([x, y])
R = max(r)
nr = {i for i, x in enumerate(r) if x == R}
C = max(c)
nc = {i for i, x in enumerate(c) if x == C}
count = 0
for x, y in s:
    count += x in nr and y in nc
print(R + C - (len(nr) * len(nc) == count))
s = input()

ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    cnt_C = 0
    length = len(s)

    n = 1
    for check_char in s[1:]:
        #print(check_char)
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
                break
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

if ans:
    print("AC")
else:
    print("WA")

### FIXED CODE ###

"""
B - AcCepted
文字列 S が与えられます。S のそれぞれの文字は英大文字または英小文字です。 S
が次の条件すべてを満たすか判定してください。

S の先頭の文字は大文字の A である。
Sの先頭から 3 文字目と末尾から 2 文字目の間（両端含む）に大文字の C がちょうど 1
個含まれる。
以上の A, C を除く S のすべての文字は小文字である。
"""

s = input()

cnt_C = 0
ans = True
if s[0] != "A":
    ans = False
    #print("s[0] is not A")
else:
    length = len(s)

    n = 1
    for check_char in s[1:]:
        #print(check_char)
        
        if check_char.islower() is False:
            if check_char != "C" or n == 1 or n == (length - 1):
                ans = False
            
            cnt_C += 1
        
        n += 1

if cnt_C != 1:
    ans = False

if ans:
    print("AC")
else:
    print("WA")
N, K = map(int, input().split())
P = list(map(int, input().split()))
C = list(map(int, input().split()))

seen = []
roots = []
candidates = []

for i in range(N):
    if i+1 in seen:
        continue
    root = [i+1]
    seen.append(i+1)
    to = P[i]
    while(root[0] != to):
        root.append(to)
        seen.append(to)
        to = P[to-1]
    roots.append(root)
for root in roots:
    eachMoveBests = [None] * (len(root))
    for i in range(len(root)):
        score = 0
        to = P[root[i]-1]
        for j in range(len(root)):
            score += C[to-1]
            to = P[to-1]
            if eachMoveBests[j] == None or score > eachMoveBests[j]:
                eachMoveBests[j] = score
    aroundTimes = K // len(root)
    surplus = K % len(root)
    sumRoot = 0
    for r in root:
        sumRoot += C[r-1]
    best = max(eachMoveBests)
    bestMoveTimes = eachMoveBests.index(best) + 1
    if surplus == 0:
        candidates.append(max(best,aroundTimes*sumRoot))
    elif bestMoveTimes <= surplus:
        candidates.append(max(best,aroundTimes*sumRoot+eachMoveBests[surplus-1]))
    else:
        candidates.append(max(best, aroundTimes*sumRoot+max(eachMoveBests[:surplus-1]), (aroundTimes-1)*sumRoot+best))
print(max(candidates))
# print(roots)


### FIXED CODE ###

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

seen = []
roots = []
candidates = []

for i in range(N):
    if i+1 in seen:
        continue
    root = [i+1]
    seen.append(i+1)
    to = P[i]
    while(root[0] != to):
        root.append(to)
        seen.append(to)
        to = P[to-1]
    roots.append(root)
for root in roots:
    length = len(root)
    eachMoveBests = [None] * length
    for i in range(length):
        score = 0
        to = P[root[i]-1]
        for j in range(len(root)):
            score += C[to-1]
            to = P[to-1]
            if eachMoveBests[j] == None or score > eachMoveBests[j]:
                eachMoveBests[j] = score
    # 周回スコア
    aroundScore = eachMoveBests[len(eachMoveBests)-1]
    if length < K and aroundScore > 0:
        for i in range(len(eachMoveBests)):
            if K-i-1 % length == 0:
                candidates.append(aroundScore * ((K-i-1) // length))
            else:
                candidates.append(aroundScore * ((K-i-1) // length) + eachMoveBests[i])
    else:
        candidates.append(max(eachMoveBests[:K]))

print(max(candidates))
import sys
input=sys.stdin.readline
n = int(input())
s = input()
n = int(input())
q = []
for i in range(n):
    q.append(input().split())

N0 = 2**(n-1).bit_length()
INF = 2**31-1
data = [set()]*(2*N0)
def update(k, x):
    k += N0-1
    data[k] = x
    while k >= 0:
        k = (k - 1) // 2
        data[k] = data[2*k+1]  | data[2*k+2]
def query(l, r):
    L = l + N0; R = r + N0
    s = set()
    while L < R:
        if R & 1:
            R -= 1
            s = s | data[R-1]

        if L & 1:
            s = s |  data[L-1]
            L += 1
        L >>= 1; R >>= 1
    return s

for i in range(len(s)):
    update(i,set(s[i]))

for que in q:
    if que[0] == "1":
        update(int(que[1])-1,set(que[2]))
    else:
        print(len(query(int(que[1])-1,int(que[2]))))

### FIXED CODE ###

n=int(input())
s=input()
q=int(input())

query=[]
for i in range(q):
    query.append(input())

ide_ele = set()

def segfunc(x, y):
    return x | y

class SegTree:
    def __init__(self, init_val, segfunc, ide_ele):
        n = len(init_val)
        self.segfunc = segfunc
        self.ide_ele = ide_ele
        self.num = 1 << (n - 1).bit_length()
        self.tree = [ide_ele] * 2 * self.num
        for i in range(n):
            self.tree[self.num + i] = init_val[i]
        for i in range(self.num - 1, 0, -1):
            self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

    def update(self, k, x):
        # param k: index(0-index)
        # param x: update value
        k += self.num
        self.tree[k] = x
        while k > 1:
            self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
            k >>= 1
    def query(self, l, r):
        #[l, r)segfunc, 0-index
        res = self.ide_ele
        l += self.num
        r += self.num
        while l < r:
            if l & 1:
                res = self.segfunc(res, self.tree[l])
                l += 1
            if r & 1:
                res = self.segfunc(res, self.tree[r - 1])
            l >>= 1
            r >>= 1
        return res

al = [{s[i]} for i in range(n)]
seg = SegTree(al, segfunc, ide_ele)

for q in query:
    que,a,b=q.split()

    if que == "1":
        seg.update(int(a)-1,set(b))
    else:
        ret=seg.query(int(a)-1,int(b))
        print(len(ret))
n=int(input())
a=list(map(int,input().split()))

xor=0
for i in a:
    xor ^= i

pop=0 #xorのpopにする
while(xor >> pop >=1):
    pop += 1

sum_xor=0 #各猫の排他的論理和
if N%2==1:
    for i in range(pop):
        sum_xor += 2 **i
else:
    sum_xor=xor

for i in range(n):
    x=a[i]^sum_xor
    print(x,end=' ')

### FIXED CODE ###

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

xor=0
for i in a:
    xor ^= i

pop=0 #xorのpopにする
while(xor >> pop >=1):
    pop += 1

sum_xor=xor #各猫の排他的論理和

ans=[]
for i in a:
    x=i^sum_xor
    ans.append(x)

print(" ".join(map(str, ans)))
import numpy as np

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

C = np.arange(A,B+1)

if len(C)<2*K:
    for x in range(len(C)):
        print(C[x])
        
        
else:
    for y in range(K):
        print(C[y])
    for z in range(len(C)-K,len(C)):
        print(C[z])


### FIXED CODE ###

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

L = B - A + 1

if L >= 2*K:
    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)
import sys

inputs = []
for line in sys.stdin:
    inputs.append(line)
    
if inputs[0] >= 3200:
  print(inputs[1])
else:
  print('red')
  
  

### FIXED CODE ###


import sys
 
inputs = []
for line in sys.stdin:
    inputs.append(line)
    
if int(inputs[0]) >= 3200:
  print(inputs[1])
else:
  print('red')
a,b,c = list(map(int,input().split()))
a1 = a//c if a%c else a//c-1
a2 = b//c
print(a2-a1)

### FIXED CODE ###

l = list(map(str,input().split()))
v = ''
for i in range(len(l)):
    v = v + l[i][0]
print(v)
import math
n, m = input().split()
n = int(n)
m = int(m)

print(int(math.factorial(n)/(2 * math.factorial(n-2)) + math.factorial(m)/(2 * math.factorial(m-2))))



### FIXED CODE ###

import math
n, m = input().split()
n = int(n)
m = int(m)
x = 0
y = 0
if n > 1:
  x = int(math.factorial(n)/(2 * math.factorial(n-2)))
if m > 1:
  y = int(math.factorial(m)/(2 * math.factorial(m-2)))

print(x+y)
import math
n, x = map(int, input().split())
cities = list(map(int, input().split()))
cities.append(x)
cities.sort()
 
def get_res(cities):
    if len(cities) <= 2:
        return cities[1] - cities[0]
    else:
        gcds = []
        for i in range(len(cities) - 2):
            c1 = cities[i]
            c2 = cities[i + 1]
            c3 = cities[i + 2]
            gcds.append(math.gcd(c2 - c1, c3 - c2))
        return min(gcds)


print(get_res(cities))

### FIXED CODE ###

n, x = map(int, input().split())
cities = list(map(int, input().split()))
cities.append(x)
cities.sort()

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

def get_res(cities):
    if len(cities) == 2:
        return cities[1] - cities[0]
    else:
        gcds = []
        for i in range(len(cities) - 2):
            c1 = cities[i]
            c2 = cities[i + 1]
            c3 = cities[i + 2]
            gcds.append(gcd(c2 - c1, c3 - c2))
        return min(gcds)

print(get_res(cities))
import math
import numpy as np

H,N=map(int,input().split())
A_list=[]
B_list=[]
for i in range(N):
    A,B=map(int,input().split())
    A_list.append(A)
    B_list.append(B)

amax=max(A_list)

inf=float('inf')
dp=np.array([0]+[inf]*(H+amax))

for i in range(N):
    A=A_list[i]
    B=B_list[i]
    for j in range(A,1+H):
        if dp[j-A]+B<dp[j]:
            dp[j]=dp[j-A]+B
    
    minA=np.amin(dp[H-A:])+B
    if minA < dp[-1]:
        dp[-1]=minA

print(int(dp[-1]))


### FIXED CODE ###

import math

def main():
    H,N=map(int,input().split())

    inf=float('inf')
    dp=[0]+[inf]*H

    for i in range(N):
        A,B=map(int,input().split())
        if A>=H:
            #dp[-1]=min(B,dp[-1])
            if B < dp[-1]:
                dp[-1]=B
        else:
            for j in range(A,H+1):
                #dp[j]=min(dp[j-A]+B,dp[j])
                if dp[j-A]+B<dp[j]:
                    dp[j]=dp[j-A]+B

                if j > H-A:
                    #dp[-1]=min(dp[-1],dp[j]+B)
                    if dp[j]+B < dp[-1]:
                        dp[-1]=dp[j]+B

    print(dp[-1])

main()
a,b,c = map(int,input().split())
count = 0


for i in range(600):
  if a == b and b == c:
    break
  a,b,c = a//2, b//2, c//2
  a, b, c = b + c, a + c, a + b
ans = i if i < 600 else -1
print(-1

### FIXED CODE ###

a,b,c = map(int,input().split())
for i in range(600):
  if a&1 or b&1 or c&1:
    break
  a,b,c = a//2, b//2, c//2
  a, b, c = b + c, a + c, a + b
ans = i if i < 500 else -1
print(ans)
def main():
    N = int(input())
    A = list(map(int, input().split()))
    
    m = A[0]
    S = 0
 
    for a in A:
        if m - a > 0:
            S += m - a
        if m < a:
            m = a
    
    print(S)
 
 
if __name__ == "__main__":
    main()

### FIXED CODE ###

import math

line = input()

strL = line.split()

N = int(strL[0])
X = int(strL[1])
T = int(strL[2])

ans = math.ceil(N/X) * T

print(ans)