Harryxun/stf_run huggingface dataset:
# a:高橋 体力
# b:高橋 攻撃力
# c:青木　体力
# d:青木　攻撃力

a,b,c,d = map(int, input().split())

while c > 0:
	c = c-b　#青木体力
	if c <= 0:
		print("Yes")
    a = a-d
    if a <= 0:
      	print("No")
  

### FIXED CODE ###

def main():

    a, b, c, d = map(int, input().split())

    while c > 0:
        c = c - b
        if c <= 0:
            print("Yes")
            return
        a = a - d
        if a <= 0:
            print("No")
            return

if __name__ == '__main__':
    main()
import sys
input = sys.stdin.buffer.readline
MOD = 10**9 + 7
N, K = map(int, input().split())
A = list(map(int, (input().split())))
ap = []
neg_cnt = 0
zero_cnt = 0
for a in A:
    if a<0:
        ap.append((-a, 1))     # sortで先に来るようマイナスを1にする
        neg_cnt += 1
    elif a==0:
        ap.append((0, 0))
        zero_cnt += 1
    else:
        ap.append((a, -1))
ap.sort(reverse=True)
# print(ap)
ans = 1
if neg_cnt==N and K%2:      # 全てが負で奇数個選ぶので、答えは負
    for i in range(K):
        ans *= ap[N-i-1][0] * ap[N-i-1][1] * -1
        ans %= MOD
else:                       # 答えは正
    neg_num = 0
    for i in range(K):
        if ap[i][1] == 1:
            neg_num += 1
    if neg_num % 2:     # 負の数が奇数だったら、-1して偶数回にし、正が出るまで見る
        neg_num -= 1
        K += 1
    i = 0
    cnt = 0
    while cnt < K:
    # for i in range(K):
        if ap[i][1] == 1:  # 負の数だったら、neg_num回まで
            if neg_num == 0:
                i += 1
                continue
            else:
                neg_num -= 1
        ans *= ap[i][0] * ap[i][1] * -1
        ans %= MOD
        cnt += 1
        i += 1

print(ans)

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline
MOD = 10**9 + 7
N, K = map(int, input().split())
A = list(map(int, (input().split())))
pos, neg = [], []
for a in A:
    if a<0:
        neg.append(a)   # 負
    else:
        pos.append(a)   # 0以上
if pos:
    if N==K:    # 全て選択で負の数が奇数ならfalse（正にできない）
        ok = (len(neg)%2 == 0)
    else:
        ok = True
else:
    ok = (K%2 == 0) # すべて負で奇数ならfalse（正にできない）
ans = 1
if ok == False: # false（正にできない）場合、絶対値が小さいものからk個かける
    A.sort(key=abs)
    for i in range(K):
        ans *= A[i]
        ans %= MOD
else:
    pos.sort()              # 後ろから取っていくので正は昇順
    neg.sort(reverse=True)  # 後ろから取っていくので負は降順
    if K%2:
        ans *= pos.pop()    # kが奇数個なら1個は正を選ぶ
    p = []  # 2個ずつかけた数を格納
    while len(pos)>=2:
        p.append(pos.pop() * pos.pop())
    while len(neg)>=2:  # 負を2回かけるのでxは正
        p.append(neg.pop() * neg.pop())
    p.sort(reverse=True)
    for i in range(K//2):   # 降順にk//2個見ていく
        ans *= p[i]
        ans %= MOD
print(ans)
a,b = input().split()
a = int(a)
c = []

c = input().split()

for i in range(int(b)):
	a-=int(c[i])

if(a>=0):
		print (a)
else:
	print("-1")


### FIXED CODE ###

r = int(input())

print(r*2*3.141592)
d = {'A': 'C', 'G': 'T', 'C': 'A', 'T': 'G'}
print(d[b])

### FIXED CODE ###

b = input().strip()
d = {"A": "T", "C": "G", "T": "A", "G": "C"}
print(d[b])
a, b = map(raw_input().split())

if a>b:
  print 'a > b'

elif a<b:
  print 'a < b'

else:
  print 'a == b'

### FIXED CODE ###

a,b = map(int, raw_input().split())
 
if a > b:
  print 'a > b'
 
elif a < b:
  print 'a < b'
 
else:
  print 'a == b'
a=input()
while a[2]!="?":
    print(eval(a.strip().replace("/", "//")))
    a=input()


### FIXED CODE ###

while 1:
  s=input()
  if s.split()[1]=="?":exit()
  print(int(eval(s)))
dif convert_Arc(x):
  return 1/x

N = int(input())
An = list(map(int,input().split()))
arcAn = map(convert_Arc,An)
sum = 0
for i in range(N):
  sum += arcAn[i]
Arc_sum = convert_Arc(sum)
print(Arc_sum)




### FIXED CODE ###

def convert_Arc(x):
  return 1/x

N = int(input())
An = list(map(int,input().split()))
arcAn = list(map(convert_Arc,An))
sum = 0
for i in range(N):
  sum += arcAn[i]
Arc_sum = convert_Arc(sum)
print(Arc_sum)
M = 2147483647
a = [M for i in range(100000)]

def j_min(x,y):
    if x < y:return x
    else: return y

def find(x,y,i,l,r):
    if r<=x or y<=l:return M
    if x<=l and r<=y: return a[i]
    return min(find(x,y,i*2,l,(l+r)/2),find(x,y,i*2+1,(l+r)/2,r))

if __name__=='__main__':
    n, m = (int(x) for x in input().split())
    t=1
    while t<n :t *= 2

    for i in range(m-1,-1,-1):
        com,x,y = (int(x) for x in input().split())
        if com :
            #continue
            print(find(x,y+1,1,0,t))
        else:
            x+=t
            a[x]=y
            while isinstance(x, int) or x >= 2:
               a[int(x/2)]=j_min(a[int(x)],a[int(x)^1])
               x/=2



### FIXED CODE ###

M = 2147483647
a = [M for i in range(500000)]

def j_min(x,y):
    if x < y:return x
    else: return y

def find(x,y,i,l,r):
    if r<=x or y<=l:return M
    if x<=l and r<=y: return a[i]
    return j_min(find(x,y,i*2,l,(l+r)/2),find(x,y,i*2+1,(l+r)/2,r))

if __name__=='__main__':
    n, m = (int(x) for x in input().split())
    t=1
    while t<n :t *= 2

    for i in range(m-1,-1,-1):
        com,x,y = (int(x) for x in input().split())
        if com :
            #continue
            print(find(x,y+1,1,0,t))
        else:
            x+=t
            a[x]=y
            while isinstance(x, int) or x >= 2:
               a[int(x/2)]=j_min(a[int(x)],a[int(x)^1])
               x/=2
a,b = map(int, input().split())
if a < b:
  print("<")
elif a == b:
  print("=")
else:
  print(">")

### FIXED CODE ###

a,b = map(str, input().split())
if a < b:
  print("<")
elif a == b:
  print("=")
else:
  print(">")
s=input()
t=input()
n=len(s)
sabc=[0]*26
tabc=[0]*26
s=list(s)
t=list(t)
s.sort()
t.sort()
count=1
syu=0
for i in range(n-1):
  if s[i]==s[i+1]:
    count+=1
  else:
    sabc[syu]=count
    count=1
    syu+=1
sabc[syu]=count
count=1
syu=0
for i in range(n-1):
  if t[i]==t[i+1]:
    count+=1
  else:
    tabc[syu]=count
    count=1
    syu+=1
tabc[syu]=count

for i in range(n):
  if tabc[i]!=0 and sabc!=0:
    if tabc[i]!=sabc[i]:
      print("No")
      count=-1
      break
if count!=-1:
  print("Yes")

### FIXED CODE ###

s=input()
t=input()
d=dict()
flag=True
ds=set()
for i in range(len(s)):

  if not(t[i] in d):
    if s[i] in ds:
      flag=False
      break
    d[t[i]]=s[i]
    ds.add(s[i])
  else:
    if d[t[i]]!=s[i]:
      flag=False
      break
if flag:
  print("Yes")
else:
  print("No")
# coding: utf-8
H,W = list(map(long,input().split()))
ans = H*W/2
if H*W%2==1:
    ans+=1
print("%d"%ans)

### FIXED CODE ###

# coding: utf-8
import math
H,W = list(map(float,input().split()))
if H==1 or W==1:
  print("1")
else:
  ans = H*W/2
  print(math.ceil(ans))
x = int(input())
flag = 0
if x < 10:
    print("Yes")
    sys.exit(0)
for l in range(1,10,1):
    num =x/l
    mod = x % l
    if num < 10 and mod == 0:
        flag =1
        break
if flag == 1:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

x = int(input())
flag = 0
for l in range(1,10,1):
    num =x/l
    mod = x % l
    if num < 10 and mod == 0:
        flag =1
        break
if flag == 1:
    print("Yes")
else:
    print("No")
import math
n,d = map(int, input().split())
x = []
for fuga in range(n):
	x.append(list(map(int, input().split())))

cnt = 0
for i in range(n - 1):
	for j in range(i+1, n):
		hoge = 0
		for num in range(d):
			hoge = hoge + pow(abs(x[i][num] - x[j][num]),2)
			if(hoge == pow(int(math.sqrt(hoge)), 2)):
			cnt = cnt + 1
print(cnt)

### FIXED CODE ###

import math

n,d = map(int, input().split())
x = []
for num in range(n):
  x.append(list(map(int, input().split())))

cnt = 0
for i in range(n - 1):
  for j in range(i+1, n):
    hoge = 0
    for num in range(d):
      hoge = hoge + pow(abs(x[i][num] - x[j][num]),2)
    if(hoge == pow(int(math.sqrt(hoge)), 2)):
       cnt = cnt + 1
print(cnt)
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = i()
A = [26**i for i in range(1,100)]
A = [0]+list(itertools.accumulate(A))
cnt = 0
for i in range(N):
    if A[i] >= N:
        p = cnt
        break
    cnt += 1
if p == 1:
    print(chr(N+96))
    exit()
s = []
if N in A:
    print('z'*p)
    exit()
for i in range(p-1):
    m = chr(N%26+96)
    if m == '`':
        m = 'a'
    s.append(m)
    N = N//26
s.append(chr(N+96))
s.reverse()
print(''.join(s))

### FIXED CODE ###

import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

N = i()
S = []
for i in range(1,100):
    if N < 27:
        break
    N -= 1
    S.append(chr(ord('a')+N%26))
    N = N//26
S.append(chr(ord('a')+N-1))
print(''.join(S[::-1]))
n,maxw=map(int,input().split())
nap=[0]*n
for i in range(n):
    nap[i]=list(map(int,input().split()))
dp=[[0]*(maxw+1) for _ in range(n)]
for i in range(n):
    for j in range(maxw+1):
        if nap[i][0]>j:
            dp[i][j]=dp[i-1][j]
        else:
            dp[i][j]=max(dp[i-1][j],dp[i-1][j-nap[i][0]]+nap[i][1])
print(dp[n-1][maxw])

### FIXED CODE ###

n,wmax=map(int,input().split())
v=[0]*n
w=[0]*n
for i in range(n):
    w[i],v[i]=list(map(int,input().split()))
sv=sum(v)+1
dp=[[float('inf')]*sv for _ in range(n)]
dp[0][v[0]-1]=w[0]
for i in range(n):
    dp[i][0]=0
for i in range(n):
    for j in range(sv):
        dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i])
ans=float('inf')
for p in range(sv-1,-1,-1):
    if dp[n-1][p]!=ans and dp[n-1][p]<=wmax:
        ans=p
        break
print(ans)
if __name__ = '__main__':
    S = input()
    dic = [chr(i) for i in range(97, 123)]
    for i in range(len(dic)):
        if dic[i] not in S:
            print(dic[i])
            return

### FIXED CODE ###

if __name__ == '__main__':
    S = input()
    dic = [chr(i) for i in range(97, 123)]
    j=0
    for i in range(len(dic)):
        if dic[i] not in S:
            j = 1
            print(dic[i])
            break
    if j == 0:
        print('None')
import itertools

N,A,B=map(int,input().split())
ans=set()

if A>B:
  print(0)
elif N==1:
  if A==B:
    print(1)
  else:
    print(0)
elif N==2:
  print(1)
else:
  for x in itertools.combinations_with_replacement(range(A,B+1),N-2):
    if x in ans:
      continue
    ans.add(sum(x))

print(len(ans))

### FIXED CODE ###

N,A,B=map(int,input().split())
 
if N==1:
  if A==B:
    print(1)
  else:
    print(0)
elif A==B:
  print(1)
elif A>B:
  print(0)
else:
  print(B*(N-2)-A*(N-2)+1)
N,K=map(int,input().split())
S=input()
A=[]
a=S[0]
count=1
for i in range(1,N):
  if S[i]==a:
    count+=1
  else:
    A.append([a,count])
    count=1
    a=S[i]
A.append([a,count])
B=[]
C=[]
for i in range(len(A)):
  if A[i][0]=='0':
    B.append(A[i][1])
  else:
    C.append(A[i][1])
if K>=len(B):
  print(sum(B)+sum(C))
else:
  D=[]
  if S[0]=='0':
    D.append(sum(B[:K])+sum(C[:K]))
    if len(B)==len(C):
      for i in range(1,len(B)-K+1):
        D.append(sum(B[i:K+i])+sum(C[i-1:K+i]))
        prin(max(D))
    else:
      for i in range(1,len(B)-K):
        D.append(sum(B[i:K+i])+sum(C[i-1:K+i]))
      D.append(sum(B[len(B)-K:len(B)+1])+sum(C[len(B)-K-1:len(B)]))
      print(max(D))
  else:
    if len(C)>len(B):
      for i in range(len(B)-K+1):
        D.append(sum(B[i:K+i])+sum(C[i:K+i+1]))
      print(max(D))
    else:
      for i in range(len(B)-K):
        D.append(sum(B[i:K+i])+sum(C[i:K+i+1]))
      D.append(sum(B[len(B)-K:len(B)+1])+sum(C[len(B)-K:len(B)+1]))
      print(max(D))

### FIXED CODE ###

from itertools import accumulate

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

count=[0]
if S[0]=="0":
    count.append(0)

s=S[0]
cnt=0
for i in range(N):
    if s==S[i]:
        cnt+=1
    else:
        count.append(cnt)
        cnt=1
        s=S[i]
count.append(cnt)
if S[N-1]=="0":
    count.append(0)

l=len(count)
count=list(accumulate(count))
ans=0
for i in range(0,l,2):
    ans=max(ans,count[min(l-1,i+2*K+1)]-count[i])
print(ans)
A,B,K=map(int, raw_input().split())
l=range(A,B+1)
d=len(l)

if d/2>=K:
	for i in l[:K]:
		print i
	for i in l[-1*K:]:
		print i
elif d/2<K and K<d:
	for i in l[:K]:
		print i
	for i in l[ K-d:]:
		print i
else:
	for i in l:
		print i

### FIXED CODE ###

A,B,K=map(int, raw_input().split())
c=set()
for i in range(A,min(B+1,A+K)):
	c.add(i)

for i in range(B,max(A-1,B-K),-1):
	c.add(i)


a=list(c)
a.sort()
for i in a:
	print i
s = input()
k = int(input())

s_list = []
times = 0
flow = 0



for i in range(len(s)):
    s_list.append(s[i])


while True:
    if s_list[flow] == s_list[flow + 1]:
        times += 1
        flow += 2
    elif s_list[flow] != s_list[flow + 1]:
        flow += 1

    if flow >= len(s) - 1:
        break

if s.count(s[len(s)-1]) % 2 == 1:
    if s[0] == s[len(s)-1]:
        times += 1



print(times*k)



### FIXED CODE ###

s = list(input())
k = int(input())
S = s.copy()
S_3 =s.copy()
cnt = 0
cnt_2 = 0
cnt_3 = 0


for i in range(1, len(s)):
    if s[i-1] == s[i]:
        cnt += 1
        s[i] = "A"

# --------------------------

for i in range(len(s)):
    S.append(S[i])

for i in range(1, len(S)):
    if S[i-1] == S[i]:
        cnt_2 += 1
        S[i] = "A"

# if k == 1:
#     print(cnt)
# else:
#     print(cnt + (cnt_2 - cnt) * (k-1))

# ---------------------------------------

for i in range(len(S)):
    S_3.append(S_3[i])

for i in range(1, len(S_3)):
    if S_3[i-1] == S_3[i]:
        cnt_3 += 1
        S_3[i] = "A"

# --------------------------------------

if k == 1:
    print(cnt)
elif k == 2:
    print(cnt_2)
elif k == 3:
    print(cnt_3)
elif cnt_2 - cnt == cnt_3 - cnt_2:
    print(cnt + (cnt_2 - cnt) * (k-1))
else:
    if k % 2 == 0:
        print(int(cnt + (cnt_2 - cnt) * (k / 2) + (cnt_3 - cnt_2) * (k / 2 - 1)))
    else:
        print(int(cnt + (cnt_2 - cnt) * ((k - 1) / 2) + (cnt_3 - cnt_2) * ((k - 1) / 2)))
import bisect
n = int(input())
a = sorted(list(map(int, input().split())))
ma = min(a)
b = sorted([x for x in map(int, input().split()) if x > ma])
mb = min(b)
c = sorted([x for x in map(int, input().split()) if x > mb])
m = len(c)
ans = 0
for x in b:
    #挿入できる箇所を返す
    p = bisect.bisect_left(a, x)
    q = m - bisect.bisect_right(c, x)
    ans += p*q
print(ans)


### FIXED CODE ###

import bisect
n = int(input())
a = sorted(list(map(int, input().split())))
b = sorted(list(map(int, input().split())))
c = sorted(list(map(int, input().split())))
m = len(c)
ans = 0
for x in b:
    #挿入できる箇所を返す
    p = bisect.bisect_left(a, x)
    q = m - bisect.bisect_right(c, x)
    ans += p*q
print(ans)
import collections
n, k = map(int, input().split())
a = map(int, input().split())
c = collections.Counter(a)

if len(c) <= K:
  print(0)
else:
  c = c.most_common()
  print(sum(c[:K-1][0]))

### FIXED CODE ###

from collections import Counter 
n,k = map(int, input().split())
a = list(map(int, input().split()))
ct = sorted(list(Counter(a).values()), reverse=True)
print(sum(ct[k:]))
x,n = map(int,input().split())
p = list(map(int,input().split()))
ans = float('inf')
for i in range(101):
    if i not in p:
        if abs(i-x) < abs(ans-x):
            ans = i
        elif abs(i-x) == abs(ans -x):
            ans = min(ans,i)
print(ans)

### FIXED CODE ###

a = list(map(int,input().split()))
print(a.index(0)+1)
while 1:
    try:
        print ans[raw_input().replace(" ","")]
    except:
        break

"""

/*

0 1 2 3 4 5 6 7
1 0 2 3 4 5 6 7
7 6 5 4 3 2 1 0


0
1
28
*/

"""

### FIXED CODE ###

from __future__ import division
import sys
if sys.version_info[0]>=3: raw_input=input

X=4
Y=2
i=0
m={}
prev={}
v=[]
for i in range(X*Y): v.append(str(i))
m[''.join(v)]=[0,0]
prev[''.join(v)]=[''.join(v),None]
q=[v]
while len(q)>0:
	v=q.pop(0)
	coor=m[''.join(v)][0]
	x=coor%X
	y=coor//X
	depth=m[''.join(v)][1]
	nextstr=''.join(v)
	if 0<x:
		v[coor],v[coor-1]=v[coor-1],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor-1,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'R']
		v[coor],v[coor-1]=v[coor-1],v[coor]
	if x<X-1:
		v[coor],v[coor+1]=v[coor+1],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor+1,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'L']
		v[coor],v[coor+1]=v[coor+1],v[coor]
	if 0<y:
		v[coor],v[coor-X]=v[coor-X],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor-X,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'D']
		v[coor],v[coor-X]=v[coor-X],v[coor]
	if y<Y-1:
		v[coor],v[coor+X]=v[coor+X],v[coor]
		if ''.join(v) not in m:
			m[''.join(v)]=[coor+X,depth+1]
			q.append(v[:])
			prev[''.join(v)]=[nextstr,'U']
		v[coor],v[coor+X]=v[coor+X],v[coor]

try:
	while True:
		v=raw_input().split()
		print(m[''.join(v)][1])
except EOFError:
	pass
L,R = (int(i) for i in input().split()) 
S=[]
j=0
if R-L>=2:
    for i in range(L,R):
        S.append((L+j)%2019)
        j=j+1
    S.sort()
    for i in range(L,R):
        if S[i]%673==0 or S[0]==0:
            print(0)
        else:
            ans=(S[0]*S[1])%2019
            print(ans)
else:
    ans=(R*L)%2019
    print(ans)

### FIXED CODE ###

L,R = (int(i) for i in input().split())
ans=0
amari=2018
if R-L>=2018:
    print(ans)
else:
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            if amari>=(i*j)%2019:
                amari=(i*j)%2019
    print(amari)
n = int(input())
a = [int(i) for i in input().split()]

a.sort(reverse = True)
c = []
for i in range(n):
    if a.count(a[i]) ==2 or a.count(a[i]) ==3:
        c.append(i+1)
    elif a.count(a[i]) >= 4:
        c.append(i+1)
        c.append(i+1)
    if len(c) >= 2:
        break

if len(c) >= 2:
    e = max(c)
    c.pop(e)
    f = max(c)
    print(e*f)
else:
    print(0)

### FIXED CODE ###

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

a.sort(reverse = True)
ans = 0
b = a.copy()
b = list(set(b))
b.sort(reverse = True)
c = [0]*len(b)
j = 0
c[j] = 1
for i in range(1,n):
    if a[i-1] == a[i]:
        c[j] +=1
    else:
        j+=1
        c[j] +=1
for i in range(len(b)):
    if c[i] >= 4:    
        
        ans = b[i]*b[i]
        break
    elif c[i] >= 2:
        for j in range(i+1,len(b)):
            if c[j] >= 2:
                ans = b[i]*b[j]
                break
        break
print(ans)
print(sum(sorted(list(map(int,input().split())[:2]))))

### FIXED CODE ###

print(sum(sorted(list(map(int,input().split())))[:2]))
S = input()
T = [0]*2019
T[0]=1
t = 0
ans = 0
dig = 1
for i in range(n):
    t = (t + (int(S[-i-1]))*dig)%2019
    dig = (dig*10)%2019
    T[t] += 1
for j in T:
    ans +=int(j*(j-1)/2)
print(ans)

### FIXED CODE ###

S = input()
T = [0]*2019
T[0]=1
t = 0
ans = 0
dig = 1
for i in range(len(S)):
    t = (t + (int(S[-i-1]))*dig)%2019
    dig = (dig*10)%2019
    T[t] += 1
for j in T:
    ans +=int(j*(j-1)/2)
print(ans)
def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

N, X = [int(n) for n in input().split()]
xs = [int(n) - X for n in input().split()]

if all([n == xs[0] for n in xs]):
    m = min(xs)
    xs = [n - m for n in xs]
    g = gcd(max(xs[0], xs[1]), min(xs[0], xs[1]))
    for n in xs[2:]:
        g = gcd(max(g, n), min(g, n))
    print(g)
else:
    print(xs[0])


### FIXED CODE ###

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

N, X = [int(n) for n in input().split()]
xs = [int(n) for n in input().split()]

xs.append(X)

m = min(xs)
xs = [n - m for n in xs]
g = gcd(max(xs[0], xs[1]), min(xs[0], xs[1]))
for n in xs[2:]:
    g = gcd(max(g, n), min(g, n))
print(g)
N = int(input())
if N<=999:
	print('ABC'
else:
	print('ABD')

### FIXED CODE ###

N = int(input())
if N<=999:
	print('ABC')
else:
	print('ABD')
W, H, x, y = map(int, input().split())

s = W * H
if x == 0:
    a = W * y
    b = W * (H - y)
    p = 1 if a == b else 0
elif y == 0:
    a = H * x
    b = H * (W - x)
elif W % x == 0 and H % y == 0:
    a = b = W * H // 2
else:
    a = W * y
    b = H * x

p = 1 if a == b else 0
print("{0} {1}".format(min(a, b), p))


### FIXED CODE ###

X, A = map(int, input().split())
if X >= A:
    print(10)
else:
    print(0)
k = input()

if k%2==0:
  print(k*k//4)
else:
  print(k//2 * (k//2 + 1))

### FIXED CODE ###

k = int(input())

if k%2 ==0 :
  s = k*k
  s1 = s//4
  print(s1)
else:
  s = k//2
  s1 = s*(s+1)
  print(s1)
import bisect
INF = 10 ** 10
s = input()
t = input()
moji = [[] for _ in range(26)]

for i, m in enumerate(s):
    moji[ord(m) - ord("a")].append(i)

for i in range(len(s)):
    moji[i].sort()

moji_o = [0 for _ in range(len(t))]

cnt = 0
ans = 1
for i, m in enumerate(t):
    if len(moji[ord(m) - ord("a")]) == 0:
        ans = -1
        break
    if i == 0:
        moji_o[i] = moji[ord(m) - ord("a")][0]
    else:
        if moji_o[i - 1] > moji[ord(m) - ord("a")][-1]:
            moji_o[i] =  moji[ord(m) - ord("a")][0]
        else:
            tmp = bisect.bisect_left(moji[ord(m) - ord("a")], moji_o[i - 1])
            if tmp == 0:
                moji_o[i] = moji[ord(m) - ord("a")][0]
            else:
                moji_o[i] = moji[ord(m) - ord("a")][tmp]

for i in range(1, len(moji_o)):
    if ans == -1:
        break
    if moji_o[i - 1] >= moji_o[i]:
        cnt += 1

if ans == -1:
    print(-1)
else:
    print(cnt * len(s) + moji_o[-1] + 1)

### FIXED CODE ###

import bisect
INF = 10 ** 10
s = input()
t = input()
moji = [[] for _ in range(26)]

for i, m in enumerate(s):
    moji[ord(m) - ord("a")].append(i)

for i in range(26):
    moji[i].sort()

moji_o = [0 for _ in range(len(t))]

cnt = 0
ans = 1
# print(moji)
for i, m in enumerate(t):
    if len(moji[ord(m) - ord("a")]) == 0:
        ans = -1
        break
    if i == 0:
        moji_o[i] = moji[ord(m) - ord("a")][0]
    else:
        if moji_o[i - 1] >= moji[ord(m) - ord("a")][-1]:
            moji_o[i] =  moji[ord(m) - ord("a")][0]
        else:
            tmp = bisect.bisect_right(moji[ord(m) - ord("a")], moji_o[i - 1])
            if tmp == 0:
                moji_o[i] = moji[ord(m) - ord("a")][0]
            else:
                moji_o[i] = moji[ord(m) - ord("a")][tmp]
# print(moji_o)
for i in range(1, len(moji_o)):
    if ans == -1:
        break
    if moji_o[i - 1] >= moji_o[i]:
        cnt += 1

if ans == -1:
    print(-1)
else:
    print(cnt * len(s) + moji_o[-1] + 1)
N = input()
A = list(map(int, input().split()))

big = max(A)
small = min(A)
print(abs(big - small))


### FIXED CODE ###

N = int(input())
if N % 2 == 0:
    ans = N
else:
    ans = N * 2
print(ans)
x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = None
d_ls = make_divisors(x)
for d in d_ls:
    for a in range(2, 100):
        b = 2-d
        c = a**5-b**5
        if c==x:
          ans = (a, b)
          break
    if ans is not None:
      break
print(ans[0], ans[1])

### FIXED CODE ###

x = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

ans = None
d_ls = make_divisors(x)
for d in d_ls:
    for a in range(0, 1000):
        b = a-d
        c = a**5-b**5
        if c==x:
          ans = (a, b)
          break
    if ans is not None:
      break
print(ans[0], ans[1])
A, B = [int(input()) for _ in range(2)]

P = A + B
M = A - B
T = A * B

if P > M or P > T:
  print(P)
elif M > P or M > T:
  print(M)
elif T > M or T > P:
  print(T)
else:
  pass

### FIXED CODE ###

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

P = A + B
M = A - B
T = A * B

print(max(P, M, T))