Harryxun/stf_run huggingface dataset:
S = input()
mozi = dict()
for i in range(4):
  try:
    mozi(S[i]) += 1
  except:
    mozi(S[i]) = 1
    
num = 0
for i in mozi:
  num += 1
  if S[i] != 2:
    print("No")
    exit()

if num == 2:
  print("Yes")
else:
  print("No")
    


### FIXED CODE ###

S = input()
mozi = dict()
for i in range(4):
	mozi[S[i]] = 0

for i in range(4):
    mozi[S[i]] += 1

num = 0
for i in mozi:
  num += 1
  if mozi[i] != 2:
    print("No")
    exit()
 
if num == 2:
  print("Yes")
else:
  print("No")
import itertools
A, B = map(int,input().split())

print(itertools.cycle(range(24))[A+B])

### FIXED CODE ###

import itertools
A, B = map(int,input().split())
print((A+B)%24)
import copy,sys
def amida(A,x):
  for e in A:
    if e[x]==1:x+=1
    elif e[x-1]==1:x-=1
  return x
def f():
  for i in range(d):
    for j in range(1,n):
      if A[i][j]==0:
        B=copy.deepcopy(A)
        B[i][j]=1
        if amida(B,m)==p:
          print i+1,j
          return
  print 1
  return
n=input()
m=input()
p=input()
d=input()
A=[]
for s in sys.stdin:
  if s=="0\n":break
  A+=[[0]+map(int,list(s[:-1]))+[0]]
if amida(A,m)==p: print 0
else:f()

### FIXED CODE ###

import sys
def amida(A,x):
  for e in A:
    if e[x]=="1":x+=1
    elif e[x-1]=="1":x-=1
  return x
def f():
  for i in D:
    for j in range(1,n):
      if A[i][j-1:j+2]=="000":
        B=[e[:] for e in A]
        B[i]=B[i][:j]+"1"+B[i][j+1:]
        if amida(B,m)==p:
          print i+1,j
          return
  print 1
  return

while 1:
  n=input()
  if n==0:break
  m=input()
  p=input()
  D=range(input())
  A=["0"+raw_input()+"0" for i in D]
  if amida(A,m)==p:print 0
  else:f()
import fractions
n=int(input())
t=[int(input()) for i in range(n)]
t.sort()
for i in range(n-1):
    f1=fractions.gcd(t[i],t[i+1])
    f2=t[i]*t[i+1]//f1
print(f2)

### FIXED CODE ###

import fractions
n=int(input())
t=[int(input()) for i in range(n)]
t.sort()
check=t[0]
if n==1:
    print(check)
else:
    for i in range(n-1):
        f1=fractions.gcd(check,t[i+1])
        f2=check*t[i+1]//f1
        check=f2
    print(f2)
from itertools import product
D, G = map(int, input().split())
P, C = zip(*[map(int, input().split()) for _ in range(D)])
INF = 10**18
ans = INF
for bit in product((0, 1), repeat=D):
    p = list(P)
    cnt = 0
    score = 0
    for i in range(D):
        if bit[i]:
            score += C[i]
            score += P[i]*100*(i+1)
            cnt += P[i]
            p[i] = 0


        if score+sum(p[i]*100*(i+1) for i in range(D)) < G:
        continue
 
    idx = D-1
    while score < G:
        while not p[idx]:
            idx -= 1
        score += 100*(idx+1)
        p[idx] -= 1
        cnt += 1
    if cnt < ans:
        ans = cnt
print(ans)

### FIXED CODE ###

from itertools import product
D, G = map(int, input().split())
P, C = zip(*[map(int, input().split()) for _ in range(D)])
INF = 10**18
ans = INF
for bit in product((0, 1), repeat=D):
    p = list(P)
    cnt = 0
    score = 0
    for i in range(D):
        if bit[i]:
            score += C[i]
            score += P[i]*100*(i+1)
            cnt += P[i]
            p[i] = 0
 
    if score+sum(p[i]*100*(i+1) for i in range(D)) < G:
        continue
 
    idx = D-1
    while score < G:
        while not p[idx]:
            idx -= 1
        score += 100*(idx+1)
        p[idx] -= 1
        cnt += 1
    if cnt < ans:
        ans = cnt
print(ans)
# -*- coding: utf-8 -*-
import numpy as np
def inpl(): return list(map(int, input().split()))
N, M, C = inpl()
B = np.array(inpl(), dtype=np.int64)
ans = 0
for _ in range(N):
    A = np.array(inpl(), dtype=np.int64)
    ans += np.sum(A*B)+C > 0
print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-
def inpl(): return list(map(int, input().split()))

H, W = inpl()
h, w = inpl()

print(H*W - h*W - H*w + h*w)
# coding: utf-8
# Your code here!
N,Q = map(int,input().split())
Graph = [[] for i in range(N + 1)]

for i in range(N - 1):
    a,b = map(int,input().split())
    Graph[a].append(b)
    Graph[b].append(a)

counter = [0] * (N + 1)

for i in range(Q): #counterに値を入れていく．
    a,b = map(int,input().split())
    counter[a] += b

seen = [False] * (N + 1)

def dfs(Graph, seen, v, counter): #s : 根から訪問している頂点までの累積和
    seen[v] = True
    for next_v in Graph[v]:
        if seen[next_v]:
            continue
        counter[next_v] += counter[v]
        dfs(Graph, seen, next_v, counter)
    
    
dfs(Graph, seen, 1, counter)
print(*counter[1:])

### FIXED CODE ###

# coding: utf-8
# Your code here!
import collections
N,Q = map(int,input().split())
Graph = [[] for i in range(N + 1)]

for i in range(N - 1):
    a,b = map(int,input().split())
    Graph[a].append(b)
    Graph[b].append(a)

counter = [0] * (N + 1)

for i in range(Q): #counterに値を入れていく．
    a,b = map(int,input().split())
    counter[a] += b

seen = [False] * (N + 1)
todo = collections.deque()

seen[1] = True
todo.append(1)

while len(todo) != 0:
    v = todo.pop()
    for next_v in Graph[v]:
        if seen[next_v]:
            continue
        seen[next_v] = True
        todo.append(next_v)
        counter[next_v] += counter[v]

print(*counter[1:])
def m():
    MOD = 998244353
    N = int(input())
    D = [0] + list(map(int, input().split()))
    if D[1] != 0:
        return 0
    tree = {}
    for i in range(1, N + 1):
        tree[D[i] + 1] = tree[D[i] + 1] + 1 if tree.get(D[i] + 1, 0) else 1

    height = len(tree.keys())+1
    cnt = 1
    for i in range(2, height):
        cnt = cnt * pow(tree[i-1], tree[i]) % MOD
    return cnt


print(m())


### FIXED CODE ###

def m():
    MOD = 998244353
    N = int(input())
    D = [0] + list(map(int, input().split()))
    if D[1] != 0:
        return 0
    tree = {1:1}
    for i in range(2, N + 1):
        if D[i] == 0: return 0
        tree[D[i] + 1] = tree[D[i] + 1] + 1 if tree.get(D[i] + 1, False) else 1

    height = len(tree.keys())+1
    cnt = 1
    for i in range(2, height):
        if not tree.get(i, 0):
            return 0
        cnt = cnt * pow(tree[i-1], tree[i]) % MOD
    return cnt


print(m())
import logging
    import math
     
    logging.basicConfig(level=logging.INFO, format="%(message)s")
    #logging.disable(logging.CRITICAL)
                
    def main():
        S = int(input())
        logging.info("Hello!")
     
        if S < 10 ** 9:
            print("0 0 1 0 1 " + str(S))
        else:
            X_2 = 10 ** 9
            Y_2 = 1
     
            Y_3 = int(S / (10 ** 9)) + 1
            X_3 =  10 ** 9 - (S % (10 ** 9))
            
            print("0 0 1000000000 1 " + str(X_3) + " " + str(Y_3))
            
            
    if __name__ == "__main__":
        main()

### FIXED CODE ###

import logging
import math

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)
            
def main():
    S = int(input())
    logging.info("Hello!")

    if S < 10 ** 9:
        print("0 0 1 0 1 " + str(S))
    else:
        X_3 =  10 ** 9 - (S % (10 ** 9))

        if X_3 == 10 ** 9:
            Y_3 = int(S / (10 ** 9))
            X_3 = 0
        else:
            Y_3 = int(S / (10 ** 9)) + 1
        
        
        print("0 0 1000000000 1 " + str(X_3) + " " + str(Y_3))
        
        
if __name__ == "__main__":
    main()
t = 0
while t == 0:	
	try:
		a,b,c,d,e,f = [int(i) for i in input().split()]
	except:
		break
	else:
		x = (e*c - b*f) / (a*e - b*d)
		y = (a*f - c*d) / (a*e - b*d)
		print(???{0:.3f}".format(x) + ??? ??? + ???{0:.3f}".format(y))

### FIXED CODE ###

t = 0
while t == 0:	
	try:
		a,b,e,c,d,f = [int(i) for i in input().split()]
	except:
		break
	else:
		x = (d*e - b*f) / (a*d - b*c) + 0
		y = (a*f - c*e) / (a*d - b*c) + 0
		print("{0:.3f}".format(x) + " " + "{0:.3f}".format(y))
n11, n12, n13 = int(input().split())
n21, n22, n23 = int(input().split())
n31, n32, n33 = int(input().split())
lines = [[n11,n12,n13],
         [n21,n22,n23],
         [n31,n32,n33],
         [n11,n21,n31],
         [n12,n22,n32],
         [n13,n23,n33],
         [n11,n22,n33],
         [n13,n22,n31]]
nums = []
for(i in range(int(input()))):
  nums.append(input())
flag = false
for(l in lines):
  if l[0] in nums:
    if l[1] in nums:
      if l[2] in nums:
        flag = True
if flag:
  print("No")
else:
  print("Yes")
    


### FIXED CODE ###

n11, n12, n13 = map(int,input().split())
n21, n22, n23 = map(int,input().split())
n31, n32, n33 = map(int,input().split())
lines = [[n11,n12,n13],
         [n21,n22,n23],
         [n31,n32,n33],
         [n11,n21,n31],
         [n12,n22,n32],
         [n13,n23,n33],
         [n11,n22,n33],
         [n13,n22,n31]]
nums = {}
r = input()
for i in range(int(r)):
  nums[int(input())] = 0
flag = False
for l in lines:
  if l[0] in nums:
    if l[1] in nums:
      if l[2] in nums:
        flag = True
if flag:
  print("Yes")
else:
  print("No")
N=input()
if N[-1]==3:
    print ("bon")
elif N[-1]==0 or N[-1]==8 or N[-1]==6 or [n-1]==1:
    print("pon")
else:
    print("hon")    


### FIXED CODE ###

N=input()
if N[-1]=="3":
    print ("bon")
elif N[-1]=="0" or N[-1]=="8" or N[-1]=="6" or N[-1]=="1":
    print("pon")
else:
    print("hon")
s = input()
if s == "RRS" or s=="SRR":
    print(2)
elif s == "SSR" or s == "SRS" or s == "RSS" s=="RSR":
    print(1)
elif s == "RRR":
    print(3)
else:
    print(0)


### FIXED CODE ###

s = input()
if s == "RRS" or s=="SRR":
    print(2)
elif s == "SSR" or s == "SRS" or s == "RSS" or s=="RSR":
    print(1)
elif s == "RRR":
    print(3)
else:
    print(0)
from numba import njit
@njit
def factorint(n):
    d = {}
    for i in range(2, int(sqrt(n))+1):
        c = 0
        q, r = divmod(n, i)
        while not r:
            c += 1
            n = q
            q, r = divmod(n, i)
        if c:
            d[i] = c
    if n != 1:
        d[n] = 1
    return d

n = int(input())
if n == 1:
    print(0)
else:
    d = factorint(n)
    s = 0
    for v in d.values():
        s += int((sqrt(8*v+1)-1)/2)
    print(s)

### FIXED CODE ###

from math import sqrt
def factorint(n):
    d = {}
    for i in range(2, int(sqrt(n))+1):
        c = 0
        q, r = divmod(n, i)
        while not r:
            c += 1
            n = q
            q, r = divmod(n, i)
        if c:
            d[i] = c
    if n != 1:
        d[n] = 1
    return d

n = int(input())
if n == 1:
    print(0)
else:
    d = factorint(n)
    s = 0
    for v in d.values():
        s += int((sqrt(8*v+1)-1)/2)
    print(s)
Z = []
for s in input():
  Z.append(int(s))

def dfs(index, value, ops):
  if index == 4:
    if value == 7:
      print(f"{Z[0]}{ops[0]}{Z[1]}{ops[1]}{Z[2]}{ops[2]}{Z[3]}=7")
      exit()
    return
  dfs(index + 1, value + Z[index], ops + ["+"])
  dfs(index + 1, value - Z[index], ops + ["-"])

dfs(1, Z[0], [])

### FIXED CODE ###

Z = []
for s in input():
  Z.append(int(s))

def dfs(index, value, ops):
  if index == 4:
    if value == 7:
      print("{}{}{}{}{}{}{}=7".format(Z[0],ops[0],Z[1],ops[1],Z[2],ops[2],Z[3]))
      # print(f"{Z[0]}{ops[0]}{Z[1]}{ops[1]}{Z[2]}{ops[2]}{Z[3]}=7")
      exit()
    return
  dfs(index + 1, value + Z[index], ops + ["+"])
  dfs(index + 1, value - Z[index], ops + ["-"])

dfs(1, Z[0], [])
s=input()

if s='A':
  print('T')
elif s='T':
  print('A')
elif s='G':
  print('C')
else:
  print('G')
        

### FIXED CODE ###

s=input()
 
if s=='A':
  print('T')
elif s=='T':
  print('A')
elif s=='G':
  print('C')
else:
  print('G')
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print("C")
else :
    print("T")

~                                                                                                    
~                                                                                                    
~                                                                                                    
~                                                                                                    
~                                                                     

### FIXED CODE ###

b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print("C")
else :
    print("G")
N, M = map(int, input().split())
wa_dict = {}
is_AC = []
ac_cnt = 0
for i in range(N):
    p, s = input().split()
    p = int(p)
    if s == 'WA':
        if is_AC.count(p) == 0:
            if wa_dict.get(p) is None:
                wa_dict[p] = 1
            else:
                wa_dict[p] += 1
        else:
            continue
    else:
        if is_AC.count(p) == 0:
            ac_cnt += 1
            is_AC.append(p)

print(ac_cnt, sum(wa_dict.values()))


### FIXED CODE ###

N, M = map(int, input().split())
ac = 0
is_AC = [False] * (N + 1)
WA_cnt = [0] * (N + 1)
for i in range(M):
    p, s = input().split()
    p = int(p)
    if s == 'WA':
        if is_AC[p]:
            continue
        else:
            WA_cnt[p] += 1
    else:
        if is_AC[p]:
            continue
        else:
            is_AC[p] = True
            ac += 1

wa = 0
for i in range(N + 1):
    if is_AC[i]:
        wa += WA_cnt[i]
print(ac, wa)
'''
うまくいかなかったパターン
1 4
1 WA
1 WA
1 WA
1 WA
'''
H, N = map(int, input().split())
x = [list(map(int, input().split())) for n in range(N)]
x = [[tmp[i] for tmp in x] for i in range(len(x[0]))]
A = x[0]
B = x[1]

def ibis(H, A, B):
    maxA = max(A)
    HmaxA = H + maxA
    minB = min(B)
    dp = [max(B) * HmaxA] * (HmaxA + 1)
    dp[0] = 0
    for h in range(HmaxA):
        for n in range(N):
            dp[h + 1] = min(dp[h + 1], dp[h] + minB)
            hp = h + A[n]
            if hp <= HmaxA:
                dp[hp] = min(dp[hp], dp[h] + B[n])
        print(h, dp)
    return min(dp[H:HmaxA+1])

print(ibis(H, A, B))

### FIXED CODE ###

H, N = map(int, input().split())
x = [list(map(int, input().split())) for n in range(N)]
x = [[tmp[i] for tmp in x] for i in range(len(x[0]))]
A = x[0]
B = x[1]

def ibis(H, A, B):
    dp = [max(B) * H] * (H + 1)
    dp[0] = 0
    for h in range(H):
        for n in range(N):
            hp = min(h + A[n], H)
            dp[hp] = min(dp[hp], dp[h] + B[n])
    return dp[H]

print(ibis(H, A, B))
a,b = map(int,input().split())
print(max(0,(a-2b)))

### FIXED CODE ###

a,b = map(int,input().split())
print(max(0,(a-2*b)))
import sys
import math
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

s = sys.stdin.readline()
ans = 0
for i in s:
  ans += int(i)
  ans %= 9

print('Yes' if ans%9 == 0 else 'No')

### FIXED CODE ###

import sys
import math
def Ii():return int(sys.stdin.readline().rstrip())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

s = sys.stdin.readline().rstrip()
ans = 0
for i in s:
	ans += int(i)
	ans %= 9

print('Yes' if ans%9 == 0 else 'No')
i = [int(input()) for i in range(5)]
temp = 0
for j in range(len(i)-1):
  for k in range(j-1):
    if i[j] - i[k] > i[5]:
      temp += 1
if temp == 0:
  print('Yay!')
else:
  print(':(')


### FIXED CODE ###

i = [int(input()) for i in range(6)]
temp = 0
if i[4] - i[3] > i[5]:
  temp += 1
if i[4] - i[2] > i[5]:
  temp += 1
if i[4] - i[1] > i[5]:
  temp += 1
if i[4] - i[0] > i[5]:
  temp += 1
if i[3] - i[2] > i[5]:
  temp += 1
if i[3] - i[1] > i[5]:
  temp += 1
if i[3] - i[0] > i[5]:
  temp += 1
if i[2] - i[1] > i[5]:
  temp += 1
if i[2] - i[0] > i[5]:
  temp += 1  
if i[1] - i[0] > i[5]:
  temp += 1  
if temp != 0:
  print(':(')
else:
  print('Yay!')
import math

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

g = math.gcd(a,b)
ans = 0
sqrtg = math.ceil(math.sqrt(g))+1
for i in range(2,sqrtg):
    #割り切れるなら割り切れなくなるまでiで割り続ける
    if ((g // i * i == g)):
        ans += 1
        while (g // i * i == g):
            g //= i

print(ans+1)





### FIXED CODE ###

import fractions
import math

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

g = fractions.gcd(a,b)
ans = 0
sqrtg = math.ceil(math.sqrt(g))
for i in range(2,sqrtg):
    #割り切れるなら割り切れなくなるまでiで割り続ける
    if (g%i == 0):
        ans += 1
        while (g % i == 0):
            g //= i
            
if (g != 1):
    ans += 1
print(ans+1)
def f(a,b):
	print(a,b)
	if a==b:
		return 2*a
	elif a < b:
		return 2*a + f(a,b-a)
	else:
		return 2*b + f(a-b,b)


N,X = map(int,input().split(" "))

print(N+f(N-X,X))

### FIXED CODE ###

def f(a,b):
	if a==b:
		d=0
		ret = a
	elif a < b:
		d = b//a
		if b%a == 0:
			ret = a*(2*d -1)
		else:
			ret = 2*a*d + f(a,b%a)
	else:
		d = a//b
		if a%b == 0:
			ret = b*(2*d -1)
		else:
			ret = 2*b*d + f(a%b,b)
	#print(a,b,d,ret)
	return ret


N,X = map(int,input().split(" "))

print(N+f(N-X,X))
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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

g = gcd(a,b)


ans = 1
for i in range(2,g):
    while g%i == 0:
        g=g//i
        isdevided = True
    if isdevided:
        ans += 1
        isdevided = False

print(ans)


### FIXED CODE ###

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


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

g = gcd(a,b)


arr = []
temp = g
for i in range(2, int(-(-g**0.5//1))+1):
    if temp%i==0:
        cnt=0
        while temp%i==0:
            cnt+=1
            temp //= i
        arr.append([i, cnt])

if temp!=1:
    arr.append([temp, 1])

print(len(arr)+1)
a, b, c, d = map(int, input().split())
if  abs(c-a) =< d:
	print("Yes")
elif abs(a-b) =< d and abs(b-c) =< d:
	print("Yes")
else:
	print("No")

### FIXED CODE ###

a, b, c, d = map(int, input().split())
if  abs(c-a) <= d:
	print("Yes")
elif abs(a-b) <= d and abs(b-c) <= d:
	print("Yes")
else:
	print("No")
a=input();b=input();h=input()

print((a+b)/2*h)

### FIXED CODE ###

a=int(input());b=int(input());h=int(input())

print((a+b)*h//2)
n = int(input())
list = list(map(int, input().split()))
list.sort()
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n, reverse=True):
            if list[i] + list[j] <= list[k]:
                break
            ans += 1
print(ans)


### FIXED CODE ###

n = int(input())
list = list(map(int, input().split()))
list.sort()
import bisect
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        index = bisect.bisect_left(list, list[i]+list[j])
        ans += index - j -1
print(ans)
while True:
	H,W = map(int,input().split(" "))

	if H == 0 and W == 0:
		break

	print(*["#" for _ in range(H)]) for _ in range(W)



### FIXED CODE ###

while True:
	H,W = map(int,input().split(" "))

	if H == 0 and W == 0:
		break

	[print(*["#"*W]) for _ in range(H)]
	print()
a,b = map(int,input().split())

import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))


### FIXED CODE ###

a,b = map(int,input().split())
 
import fractions
 
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
 
print(lcm(a, b))
N, L = map(int, input().split())

sum_N = N*((N+1)/2 + L - 1)

if L >= 0 :
  print(sum_N - L)
else if L + N - 1 < 0 :
  print(sum_N - (L + N - 1))
else :
  print(sum_N)

### FIXED CODE ###

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

sum_N = int(N*((N+1)/2 + L - 1))

if L >= 0 :
  print(sum_N - L)
elif L + N - 1 < 0 :
  print(sum_N - (L + N - 1))
else :
  print(sum_N)
import sys
L = []
for l in sys.stdin:
  L.append(l)
N = int(L[0])
A = list(map(int, L[1].split()))

answer = 1
for a in A:
  answer = answer * a
  if answer > 1000000000000000000:
    print(-1)
    break
if answer <= 1000000000000000000:
  print(answer)

### FIXED CODE ###

A, B = map(int, input().split())
print(A * B)
a, b, x = int(input())
if x < a:
  print('NO')
elif a+b < x:
  print('NO')
else:
  print('YES')

### FIXED CODE ###

a, b, x = map(int, input().split())
if x < a:
  print('NO')
elif a+b < x:
  print('NO')
else:
  print('YES')
from scipy.special import comb

N=int(input())
t=tuple([''.join(sorted(list(input()))) for _ in range(N)])
Dic = {}
ans = 0
for i in range(N):
    if t[i] in Dic:
        Dic[t[i]]+=1
    else:
        Dic[t[i]]=1
for k in tuple(Dic.keys()):
    if Dic[k]==1:
        pass
    else:
        comb(Dic[k], 2, exact=True)
print(int(ans))

### FIXED CODE ###

from operator import mul
from functools import reduce
def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

N=int(input())
t=tuple([''.join(sorted(list(input()))) for _ in range(N)])
Dic = {}
ans = 0
for i in range(N):
    if t[i] in Dic:
        Dic[t[i]]+=1
    else:
        Dic[t[i]]=1
for k in tuple(Dic.keys()):
    if Dic[k]==1:
        pass
    else:
        ans+=cmb(Dic[k], 2)
print(int(ans))
import numpy as np
N, K = map(int, input().split())
A = np.array(input().split(), dtype=np.int64)

dif = np.abs(A - K)
ans = np.gcd.reduce(dif)
print(ans)

### FIXED CODE ###

N, X=map(int, input().split())
x=[abs(int(i)-X) for i in input().split()]

def gcd(x, y):
    x, y=max(x,y), min(x,y)
    if y==0:
        return x
    else:
        return gcd(y, x%y)

ans=1
for i in range(N):
    if i==0:
        ans=x[i]
    else:
        ans=gcd(ans, x[i])
print(ans)
h,w = map(int,input().split())

a = []
for i in range(h):
	b = list(map(int,input().split()))
	b = [i%2 for i in b]
	a.append(b)

ans = []
for i in range(h):
	for j in range(w-1):
		if a[i][j] == 1:
			a[i][j+1] += 1
			ans.append([i+1,j+1,i+1,j+2])
if w != 2:
	for i in range(h-1):
		if a[i][-1] == 1:
			a[i+1][j] += 1
			ans.append([i+1,w,i+2,w])


print(len(ans))

for i in ans:
	print(i[0],i[1],i[2],i[3])

### FIXED CODE ###

h,w = map(int,input().split())

a = []

for i in range(h):
	a.append(list(map(int,input().split())))
ans = []
for i in range(h):
	for j in range(w-1):
		if a[i][j] % 2 == 1:
			a[i][j+1] += 1
			ans.append([i+1,j+1,i+1,j+2])

for k in range(h-1):
	if a[k][w-1] % 2 == 1:
		a[k+1][w-1] += 1
		ans.append([k+1,w,k+2,w])
print(len(ans))
for i in ans:
	print(i[0],i[1],i[2],i[3])
a, b = map(int, input().split())
r = 0
for i in range(a, b + 1):
  if i == i[::-1]:
    r += 1
print(r)

### FIXED CODE ###

a, b = map(int, input().split())
r = 0
for i in range(a, b + 1):
  if str(i) == str(i)[::-1]:
    r += 1
print(r)
i = 0
while True:
    x,y = raw_input()
    if x == 0 and y == 0:
        break
    if x > y:
        x,y = map(str,(x,y))
        print x + " " + y
    else:
        x,y = map(str,(x,y))
        print y + " " + x
    i += 1
    #print "Case %d: %d" % (i, x)

### FIXED CODE ###


while True:
    x,y = raw_input().split()
    x,y = map(int,(x,y))
    if x == 0 and y == 0:
        break
    if x > y:
        x,y = map(str,(x,y))
        print y + " " + x
    else:
        x,y = map(str,(x,y))
        print x + " " + y
m = 55555

p = [False] * m
for i in range(3, m):
  if not p[i]:
    continue
  for j in range(2, m):
    if j * i >= len(p):
      break
    p[i*j] = False
    
n = int(input())

ans = []
for i in range(m):
  if len(ans)==n:
    break
  t = i*5+7
  if not p[t]:
    continue
  ans.append(t)
print(" ".join(ans))
    
          






### FIXED CODE ###

m = 55555

p = [True] * m
for i in range(3, m):
    if not p[i]:
        continue
    for j in range(2, m):
        if j * i >= len(p):
            break
        p[i*j] = False

n = int(input())
if n <= 5:
    t = [2, 3, 5, 7, 11]
    print(" ".join([str(a) for a in t[:n]]))
else:
    ans = []
    for i in range(m):
        if len(ans) == n:
            break
        t = i*5+7
        if not p[t]:
            continue
        ans.append(t)
    print(" ".join([str(a) for a in ans]))
s=input()
even = ["L","U","D"]
odd = ["R", "U", "D"]
f = false
for i in range(len(s)):
  if i%2:
    if s[i] not in even:
      f = True
  else:
    if s[i] not in odd:
      f = True
if f:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

s=input()
even = ["L","U","D"]
odd = ["R", "U", "D"]
f = False
for i in range(len(s)):
  if i%2:
    if s[i] not in even:
      f = True
  else:
    if s[i] not in odd:
      f = True
if f:
  print("No")
else:
  print("Yes")
from itertools import*;i=lambda:sorted([len(list(v))for k,v in groupby(input()]);print('YNeos'[i()!=i()::2])

### FIXED CODE ###

import collections as c
s=input()
t=input()
d=c.defaultdict(list)
d2=c.defaultdict(list)
for k,v in enumerate(s):
    d[v].append(k)
for k,v in enumerate(t):
    d2[v].append(k)
a=set(tuple(i) for i in d.values())
b=set(tuple(i) for i in d2.values())
if a==b:
    print("Yes")
else:
    print("No")