Harryxun/stf_run huggingface dataset:
import math
n = int(input())
a_list = sorted(list(map(int,input().split())))

a = a_list[0]
for i in range(1,n):
    a = math.gcd(a,a_list[i])

print(a)

### FIXED CODE ###

import fractions
n = int(input())
a_list = sorted(list(map(int,input().split())))

a = a_list[0]
for i in range(1,n):
    a = fractions.gcd(a,a_list[i])

print(a)
a, b, c = map(int, input().split())
ans = 0
for i in range(a):
    n = int(input())
    if n < b:
        ans += 1
print ans

### FIXED CODE ###

a, b, c = map(int, input().split())
ans = 0
for i in range(a):
    n = int(input())
    if n < b or n >= c:
        ans += 1
print(ans)
s = str(input())

if s[0] == s[1] and s[2] = s[3] and s[0] =! s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] =! s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] =! s[1]:
    print('Yes')

else:
    print('No')

### FIXED CODE ###

s = str(input())

if s[0] == s[1] and s[2] == s[3] and s[0] != s[2]:
    print('Yes')

elif s[0] == s[2] and s[1] == s[3] and s[0] != s[1]:
    print('Yes')

elif s[0] == s[3] and s[1] == s[2] and s[0] != s[1]:
    print('Yes')

else:
    print('No')
import itertools
import math
import numpy as np

n=int(input())
l=[]
for i in range(n):
    array=list(map(int,input().split()))
    l.append(array)

ll=[]
for v in itertools.permutations(range(n)):
    ll.append(list(v))
a=0
for j in ll:
    for k in range(len(j)-1):
        x=j[k]
        y=j[k+1]
        dis=math.sqrt((l[x][0]-l[y][0])**2+(l[x][1]-l[y][1])**2)
        a+=dis

print(a/len(ll))

### FIXED CODE ###

import itertools
import math
import numpy as np

n=int(input())
l=[]
for i in range(n):
    array=list(map(int,input().split()))
    l.append(array)

ll=[]
for v in itertools.permutations(range(n)):
    ll.append(list(v))
a=0
for j in ll:
    for k in range(len(j)-1):
        x=j[k]
        y=j[k+1]
        dis=math.sqrt((l[x][0]-l[y][0])**2+(l[x][1]-l[y][1])**2)
        a+=dis

print(a/len(ll))
N=int(input())
S=str(input())
list_S=list(S)
ans=0

for i in range(N):
    if list_S[i]=='A':
        if list_S[i+1]=='B':
            if list_S[i+2]=='C':
                ans += 1

print(ans)

### FIXED CODE ###

N=int(input())
S=str(input())
list_S=list(S)
ans=0

for i in range(N-2):
    if list_S[i]=='A':
        if list_S[i+1]=='B':
            if list_S[i+2]=='C':
                ans += 1
    

print(ans)
import numpy as np

MOD = 10**9+7

D,T,E = input().split()
n= int(D)

arr = np.zeros((n+1,n+1),dtype=np.int16)
for i in range(3,n+1):
    arr[0,i] = 1

for i in range(1,n+1):
    sum_ = 0
    for j in range(3*i,n+1):
        sum_ += arr[i-1,j]
        sum_ %= MOD
        if j+3 >= n + 1:
            break

### FIXED CODE ###

D,T,S = [int(i) for i in input().split()]
out = 'Yes' if D <= T * S else 'No'
print(out)
s = input()
ans="YES"
if len(s)>9:
	ans="NO"
else:
	a="KIHBR"
	kihbr=""
	for c in s:
		if c=="A":
			contine
		else:
			kihbr+=c
    if kihbr!=a:
		ans="NO"		
	if not "KIH" in s:
		ans="NO"
	if "AA" in s:
		ans="NO"
		
print(ans)	


### FIXED CODE ###

s = input()

r = "AKIHABARA"
r2 = "KIHBR"
ans = "YES"
if not 5 <= len(s) <= len(r):
    ans = "NO"
if "AA" in s:
    ans = "NO"
if not "KIH" in s:
    ans = "NO"
else:
    rem_A = ""
    for c in s:
        if c != "A":
            rem_A += c
    if not rem_A == r2:
        ans = "NO"
print(ans)
n = int(input())
a= list(map(int,input().split()))
if n == 1:
  print(n)
  exit()

a.sort()
dp = [1] * n

def div(k):
  global dp
  if dp[k] != 0:
    for i in range(k):
      if a[k]%a[i] == 0:
        dp[k] = 0
        if a[k] == a[i]:dp[i] = 0
        break
  if k < n-1:div(k+1)

div(1)
print(sum(dp))

### FIXED CODE ###

from collections import Counter
n = int(input())
a= list(map(int,input().split()))
if n == 1:
  print(1)
  exit()

a.sort()

c = Counter(a)
a = list(set(a))
dp = [0] * (10**6 +1)

for x in a:
  t = x * 2
  while t <= 10**6:
    dp[t] = 1
    t += x

ans = 0
for x in a:
  if (c[x] == 1) & (dp[x] == 0):
    ans += 1

print(ans)
from math import gcd

def solve(n, x0, X):
    X = [abs(x - x0) for x in X]
    g = X.pop()
    for x in X:
        g = gcd(g, x)
    return g

_n , _x0 = map(int, input().split())
_X = map(int, input().split())
print(solve(_n, _x0, _X))


### FIXED CODE ###

def solve(n, x0, X):

    def gcd(a, b):
        if a > b:
            a, b = b, a
        while a % b != 0:
            a, b = b, a % b
        return b

    X = [abs(x - x0) for x in X]
    g = X.pop()
    for x in X:
        g = gcd(g, x)
    return g

_n , _x0 = map(int, input().split())
_X = map(int, input().split())
print(solve(_n, _x0, _X))
A,B,C=map(int,input().split())
if A==B&&A==C:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

A,B,C=map(int,input().split())
if A==B and A==C:
  print("Yes")
else:
  print("No")
N = int(input())
card = list(map(int,input().split()))
sorted_card = sorted(card)
Alice = 0
Bob = 0

for i in range(N):
    if i == 0 or i % 2 == 0:
        Alice += sorted_card[i]
    else:
        Bob += sorted_card[i]

print(Alice - Bob)

### FIXED CODE ###

N = int(input())
A = int(input())

if N - (N//500)*500 <= A:
    print('Yes')
else:
    print('No')
n = int(input())
l = map(int, input().split(' '))

ans = 0
for i in range(0, n, 2):
  if l[i] % 2 == 1:
    ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
l = list(map(int, input().split(' ')))
 
ans = 0
for i in range(0, n, 2):
  if l[i] % 2 == 1:
    ans += 1
print(ans)
s = list(input())
ans = 753 - int(s[0] + s[1] + s[2])
for i in range (8):
  num = s[i] + s[i+1] + s[i+2]
  if ans > abs(int(num)-753):
    ans = abs(int(num)-753)
print(ans)

### FIXED CODE ###

s = list(input())
ans = abs(753 - int(s[0] + s[1] + s[2]))
for i in range (len(s) - 2):
  num = s[i] + s[i+1] + s[i+2]
  if ans > abs(int(num)-753):
    ans = abs(int(num)-753)
print(ans)
a,b,c = map(int,input.split())
print("YES" if b-a == c-b else "NO")

### FIXED CODE ###

a,b,c = map(int,input().split())
print("YES" if b-a == c-b else "NO")
n=input()
k=n.split(" ")
a=int(k[0])
b=int(k[1])
print a*b ,
print (a+b)*2

### FIXED CODE ###

n=raw_input()
k=n.split(" ")
a=int(k[0])
b=int(k[1])
print a*b ,
print (a+b)*2
n = input()
total = 0

#a > b
def gcd(a,b):
	if b == 0:
		return a

	return gcd(b, a % b)

total = total + n * (n+1) / 2

for i in range(n):
	for j in range(i+1,n):
		total = total + 6 * gcd(j+1,i+1)

for i in range(n):
	for j in range(i+1,n):
		for k in range(j+1,n):
			l = gcd(j+1,k+1)
			if i < l:
				total = total + 6 * gcd(l,i+1)
			else:
				total = total + 6 * gcd(i+1,l)

print(int(total))

### FIXED CODE ###

n = int(input())
total = 0

#a > b
def gcd(a,b):
	if b == 0:
		return a

	return gcd(b, a % b)

total = total + n * (n+1) / 2

for i in range(n):
	for j in range(i+1,n):
		total = total + 6 * gcd(j+1,i+1)

for i in range(n):
	for j in range(i+1,n):
		for k in range(j+1,n):
			l = gcd(j+1,k+1)
			if i < l:
				total = total + 6 * gcd(l,i+1)
			else:
				total = total + 6 * gcd(i+1,l)

print(int(total))
S = input()
T = input()

s = len(S)
t = len(T)
ans1 = 10000000

for i in range(s - t + 1):
  ans = 0
  for j in range(t):
    if t[j] != s[i + j]:
      ans += 1
      
  ans1 = ans
      
print(ans1)

### FIXED CODE ###

S = input()
T = input()

s = len(S)
t = len(T)
ans1 = 10000000

for i in range(s - t + 1):
  ans = 0
  for j in range(t):
    if T[j] != S[i + j]:
      ans += 1
      
  ans1 = min(ans, ans1)
      
print(ans1)
n,m = map(int, input().split())
a = list(map(int, input().split()))
a_sort = sorted(a)

""" for i in range(m):
    temp = list(map(int, input().split()))
    for j in range(temp[0]):
        a_sort[j] = max(a_sort[j],temp[1])
    a_sort = sorted(a_sort)

print(sum(a_sort))
 """

bc = []
for i in range(m):
    temp = list(map(int, input().split()))
    bc.append(temp)

bc_sorted = sorted(bc, key = lambda x:x[1], reverse = True)

repl = [bc_sorted[0][1]]*bc_sorted[0][0]

for i in range(1,m):
    if bc_sorted[i-1][0] < bc_sorted[i][0]:
        for j in range(bc_sorted[i][0]-bc_sorted[i-1][0]):
            repl.append(bc_sorted[i][1])

for i in range(n-len(bc_sorted)):
    repl.append(0)

sum = 0
for i in range(n):
    sum = sum + max(repl[i],a_sort[i])

print(sum)


### FIXED CODE ###

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

bc = []
for i in range(m):
    temp = list(map(int, input().split()))
    bc.append(temp)

bc_sorted = sorted(bc, key = lambda x:x[1], reverse = True)
temp = 0

for i in range(m):
    for j in range(temp,min(n,temp+bc_sorted[i][0])):
        if a_sort[j] < bc_sorted[i][1]:
            a_sort[j] = bc_sorted[i][1]
            temp += 1
        else:
            break

print(int(sum(a_sort)))
def main():
  list_s = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
  list_s.sort()
  
  k = int(input())
  
  print(list_s[k+1])
  
main()

### FIXED CODE ###

K = int(input())
k = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(k[K-1])
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
s=input()
ans=0
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R" and s[2]!="R" or s[1]=="R" and s[2]=="R" and s[0]!="R":
    print(2)
elif s[0]=="R" or s[1]=="R" or s[2]=="R":
    print(1)
else:
    print(0

### FIXED CODE ###

import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
s=input()
ans=0
if s[0]=="R" and s[1]=="R" and s[2]=="R":
    print(3)
elif s[0]=="R" and s[1]=="R" and s[2]!="R" or s[1]=="R" and s[2]=="R" and s[0]!="R":
    print(2)
elif s[0]=="R" or s[1]=="R" or s[2]=="R":
    print(1)
else:
    print(0)
s = int(input().split())
N,X,T =s[0],s[1],s[2]
n = N//X
if N % X != 0:
  n += 1
out = n * T
print(out)


### FIXED CODE ###

import numpy as np 

s_ = np.array(input().split())
s = [int(i) for i in s_]
N,X,T =s[0],s[1],s[2]
n = N//X
if N % X != 0:
  n += 1
out = n * T
print(out)
from itertools import accumulate,combinations
n,k = map(int,input().split())
a = list(map(int,input().split()))
acc = [0]+list(accumulate(a))
ls = []
for i,j in combinations(acc,2):
  ls.append(j-i)
x = max(ls).bit_length()
ans = 0
for i in range(x-1,-1,-1):
  cnt = 0
  for j in ls:
    if ans+2**i & j == ans+2**i:
      cnt += 1
  if cnt >= k:
    ans += 2**i
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
avg = sum(a)/n
difmin = 10**18
for i in range(n):
  if difmin>abs(a[i]-avg):
    difmin = abs(a[i]-avg)
    ans = i
print(ans)
def main():
    s = input()
    t = input()

    for i in range(len(s)-len(t)+1):
        flag = True
        for j in range(len(t)):
            if s[i+j] != t[j] and s[i+j] != '?':
                flag = False
                break
        if flag:
            s = s[:i] + t + s[i+len(t):]
            #break

    if flag:
        print(s.replace('?', 'a'))
    else:
        print("UNRESTORABLE")
        

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    r = int(input())
    g = int(input())
    print(g*2 - r)


if __name__ == "__main__":
    main()
import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    h, w, a, b = ns()

    flg1 = h * a == w * b
    flg2 = w % a == 0 and h % b == 0
    flg3 = a == 0 or b == 0
    if not(flg1 and flg2) and not flg3:
        print("No")
        exit(0)

    if b == 0:
        ans = "0" * a + "1" * (w - a)
        print(ans)
    elif a == 0:
        for _ in range(h):
            print("1" * w)
    else:
        for i in range(int(h // b)):
            for j in range(b):
                ans = "1" * i + "0" * a + "1" * (w - a - a * i)
                print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

# import re
import math
import collections
# import decimal
# import bisect
# import itertools
import fractions
# import functools
import copy
# import heapq
import decimal
# import statistics
import queue

sys.setrecursionlimit(10000001)
INF = 10 ** 16
MOD = 10 ** 9 + 7

ni = lambda: int(sys.stdin.readline())
ns = lambda: map(int, sys.stdin.readline().split())
na = lambda: list(map(int, sys.stdin.readline().split()))


# ===CODE===


def main():
    h, w, a, b = ns()

    for i in range(h):
        if i < b:
            print("0" * a + "1" * (w - a))
        else:
            print("1" * a + "0" * (w - a))


if __name__ == '__main__':
    main()
import sys
import numpy as np
from collections import deque,defaultdict

inp=lambda v,w:v[0]*w[0]+v[1]*w[1]
isprop = lambda a,b: a[0]*b[1]==a[1]*b[0]
cwsum = lambda l:[sum([x[0] for x in l]), sum([x[1] for x in l])]
chmin = lambda a,b:(a,b)[b<a]
# cwsum = lambda l:np.sum(l,axis=0)
            
def main():
    N,Ma,Mb=map(int,input().split())
    ch=dict()
    for _ in range(N):
        a,b,c=map(int,input().split())
        ch[(a,b)]=c
    p=[(-1)*Mb,Ma]
    pch={inp(p,v):ch[v] for v in iter(ch)} #p方向への射影
    kpch=list(pch.keys())
    infty=10**9
    X=N*200
    dp=[[infty]*(2*X+1) for _ in range(N)]
    for i in range(N):
        for j in range(2*X+1):
            if i==0 and j==X+kpch[0]:
                dp[i][j]=pch[kpch[0]]
            elif i>0 and j>=kpch[i] and j<=2*X+kpch[i]:
                dp[i][j]=chmin(dp[i-1][j],dp[i-1][j-kpch[i]]+pch[kpch[i]])
            elif i>0:
                dp[i][j]=dp[i-1][j]
    #  print(kpch)
    #  print(pch)
    #  print(dp)
    if dp[N-1][X]==infty:
        print(-1)
    else:
        print(dp[N-1][X])

if __name__=='__main__':
    main()


### FIXED CODE ###

import sys
import numpy as np
from collections import deque,defaultdict

inp=lambda v,w:v[0]*w[0]+v[1]*w[1]
isprop = lambda a,b: a[0]*b[1]==a[1]*b[0]
cwsum = lambda l:[sum([x[0] for x in l]), sum([x[1] for x in l])]
chmin = lambda a,b:(a,b)[b<a]
# cwsum = lambda l:np.sum(l,axis=0)
            
def main():
    N,Ma,Mb=map(int,input().split())
    infty=10**9
    ch=[list(map(int,input().split())) for _ in range(N)]
    p=[(-1)*Mb,Ma]
    # cand=[v[2] for v in ch if inp(p,v[:2])==0]
    # if cand:
        # m1=min(cand)
    # else:
        # m1=infty
    # ncand=[v for v in ch if inp(p,v[:2])!=0] #p方向への射影
    pch=[[inp(v[:2],p),v[2]] for v in ch]
    X=N*max([abs(w[0]) for w in pch])
    dp=[[infty]*(2*X+1) for _ in range(N)]
    for i in range(N):
        for j in range(2*X+1):
            if i==0 and j==X+pch[0][0]:
                dp[i][j]=pch[0][1]
            elif i>0 and j==X+pch[i][0]:
                dp[i][j]=chmin(dp[i-1][j],pch[i][1])
            elif i>0 and j>=pch[i][0] and j<=2*X+pch[i][0]:
                dp[i][j]=chmin(dp[i-1][j],dp[i-1][j-pch[i][0]]+pch[i][1])
            elif i>0:
                dp[i][j]=dp[i-1][j]
    #  print(ch)
    #  print(pch)
    #  print(dp)
    if dp[N-1][X]==infty:
        print(-1)
    else:
        print(dp[N-1][X])

if __name__=='__main__':
    main()
m_1,d_1 = int(input(),split())
m_2,d_2 = int(input(),split())
if d_2!=d_1+1:
	print(1)
else:
  print(0)

### FIXED CODE ###

m_1,d_1 = map(int, input().split())
m_2,d_2 = map(int, input().split())
if d_2!=d_1+1:
	print(1)
else:
  print(0)
X, K, D = [int(x) for x in input().strip().split(" ")]

k, x = divmod(X, D)
if K >= k:
    X = x
    K -= k
    if k % 2 == 0:
        print(abs(X))
    elif X < 0:
        print(abs(X + D))
    else:
        print(abs(X - D))
elif X < 0:
    print(abs(X + D * K))
else:
    print(abs(X - D * K))

### FIXED CODE ###

S = input().strip()

if S == "RRR":
    print(3)
elif "RR" in S:
    print(2)
elif "R" in S:
    print(1)
else:
    print(0)
n, k = map(int, input().split())

s = input()

s2 = list(s[:k-1] + s[k-1].lower + s[k:])
print(s2)


### FIXED CODE ###

n, k = map(int, input().split())
s=input()

print(s[:k-1]+s[k-1].lower()+s[k:])
N,M,Q = map(int,input().split())
T = [[0 for _ in range(N+1)] for _ in range(N+1)]
for i in range(M):
  L,R = map(int, input().split())
  T[L][R] += 1
pprint(T)
for l in range(1,N+1):
  for r in range(1,N+1):
    T[l][r] += T[l-1][r]+T[l][r-1]-T[l-1][r-1]
ans = []
pprint(T)
for i in range(Q):
  p,q = map(int, input().split())
  ans.append(T[p-1][p-1]+T[q][q]-T[p-1][q]-T[q][p-1])
print('\n'.join(map(str,ans)))
quit()


### FIXED CODE ###

N,M,Q = map(int,input().split())
T = [[0 for _ in range(N+1)] for _ in range(N+1)]
for i in range(M):
  L,R = map(int, input().split())
  T[L][R] += 1
for l in range(1,N+1):
  for r in range(1,N+1):
    T[l][r] += T[l-1][r]+T[l][r-1]-T[l-1][r-1]
ans = []
for i in range(Q):
  p,q = map(int, input().split())
  ans.append(T[p-1][p-1]+T[q][q]-T[p-1][q]-T[q][p-1])
print('\n'.join(map(str,ans)))
n = int(input())

g = [[-1 for j in range(n)] for i in range(n)]

for i in range(n):
	a = int(input())
	for _ in range(a):
		x, y = map(int, input().split())
		g[i][x-1] = y

ans = 0
for s in range(2**n):
	ok = True
	for i in range(n):
		if (s>>i&1) == 1:
			for j in range(n):
				if g[i][j] != -1 && (s>>j&1) != g[i][j]:
                  ok = False
	if ok:
		ans = max(ans, bin(s).count("1"))

print(ans)


### FIXED CODE ###

n = int(input())

g = [[-1 for j in range(n)] for i in range(n)]

for i in range(n):
	a = int(input())
	for _ in range(a):
		x, y = map(int, input().split())
		g[i][x-1] = y

ans = 0
for s in range(2**n):
	ok = True
	for i in range(n):
		if (s>>i&1) == 1:
			for j in range(n):
				if g[i][j] == -1: continue
				if (s>>j&1) != g[i][j]: ok = False
	if ok:
		ans = max(ans, bin(s).count("1"))

print(ans)
# -*- coding: utf-8 -*-
N = int(input())
A = [int(input()) for _ in range(N)]
setA = set(A)
tempA = list(setA)
R = sorted(tempA, reverse=True)
max_v = R[0]
max_v2 = R[1]

for i in range(N):
  if A[i] == max_v:
    print(max_v2)
  else:
    print(max_v)


### FIXED CODE ###

# -*- coding: utf-8 -*-
N = int(input())
A = [int(input()) for _ in range(N)]
setA = set(A)
tempA = list(setA)
R = sorted(tempA, reverse=True)
max_v = R[0]
if len(R) >= 2:
  max_v2 = R[1]
else:
  max_v2 = R[0]
R2 = sorted(A, reverse=True)
if R2[0] == R2[1]:
  signal = 1
else:
  signal = 0
  
for i in range(N):
  if A[i] == max_v and signal == 0:
    print(max_v2)
  else:
    print(max_v)
s = str(input())
count = []
x = 0 
for i in range(len(s)):
    if s[i] == "R":
        x += 1
        if s[i] == len(s)-1:
            count.append(x)
    if s[i] == "S":
        count.append(x)
        x = 0

print(max(count))

### FIXED CODE ###

s = str(input())
count = []
x = 0 
for i in range(len(s)):
    if s[i] == "R":
        x += 1
        if i == len(s)-1:
            count.append(x)
    if s[i] == "S":
        count.append(x)
        x = 0

print(max(count))
n=int(input())
x=list(map(int,input().split(' ')))
x1=x[:]
x1.sort()
x2=x1[:]
for i in range(n):
    l=x[i]
    print(x1)
    x1.remove(l)
    print (x1[int(n/2)-1])
    print(x1)
    x1=x2[:]


### FIXED CODE ###

import numpy as np
n=int(input())
x=list(map(int,input().split(' ')))
x1=x[:]
x.sort()
m1=x[int(n/2)-1]
m2=x[int(n/2)]
for i in range(n):
    now=x1[i]
    if x1[i]<=m1:
        print(m2)
    else:
        print(m1)
a, b, c, d = input()
print("Yes if a == b == c or b == c ==d else "No")

### FIXED CODE ###

a,b,c,d = input()
if a == b == c or b == c == d:
    print("Yes")
else:
    print("No")
a,b,c = map(int,input().split())
a,b = b,a
a,c = c,a
print(a," ",b,"

### FIXED CODE ###

a,b,c = list(map(int,input().split()))
a,b = b,a
a,c = c,a
print(a,b,c)
n = int(input())
for i in range(n):
    x0,y0,x1,y1,x2,y2,x3,y3 = map(float,input().split())
    if x1 - x0 == 0:
        if x3 -x2 == 0:
            print('2')
        elif y3 - y2 == 0:
            print('1')
        else:
            print('0')
    elif x3 - x2 == 0:
        if y1 - y0 == 0:
            print('1')
        else:
            print('0')
    elif y1 - y0 == 0:
        if y3 - y2 == 0:
            print('2')
        elif x3 - x2 == 0:
            print('1')
        else:
            print('0')
    elif y3 - y2 == 0:
        elif x1 - x0 == 0:
            print('1')
        else:
            print('0')
    else:
        a1 = (y1-y0)/(x1-x0)
        a2 = (y3-y2)/(x3-x2)
        if a1 * a2 == -1:
            print('1')
        elif a1 == a2 or a1 == -a2:
            print('2')
        else:
            print('0')

### FIXED CODE ###

import sys
 
 
def get_line(line_info):
    for line_pair in line_info:
        line_axis = tuple(map(int, line_pair))
        p0, p1, p2, p3 = (x + y * 1j for x, y in zip(line_axis[::2], line_axis[1::2]))
        # print(p0, p1, p2, p3)
        if dot(p1 - p0, p3 - p2) == 0:
            print('1')
        elif cross(p1 - p0, p3 - p2) == 0:
            print('2')
        else:
            print('0')
    return line_info
 
 
def cross(a, b):
    return a.real * b.imag - a.imag * b.real
 
 
def dot(a, b):
    return a.real * b.real + a.imag * b.imag
 
 
if __name__ == '__main__':
    _input = sys.stdin.readlines()
    questions = int(_input[0])
    lines = map(lambda x: x.split(), _input[1:])
    ans = get_line(lines)
While True:
    a, op, b = input().split()
    a,b = int(a), int(b)
    op_dict = {'+': (lambda x,y: x + y),
               '-': (lambda x,y: x - y),
               '*': (lambda x,y: x * y),
               '/': (lambda x,y: x // y),
               '?': '?'}
    func = op_dict[op]
    if func == '?': break 
    print('%d' % int(func(a, b)))

### FIXED CODE ###

while True:
    a, op, b = input().split()
    a,b = int(a), int(b)
    op_dict = {'+': (lambda x,y: x + y),
               '-': (lambda x,y: x - y),
               '*': (lambda x,y: x * y),
               '/': (lambda x,y: x // y),
               '?': '?'}
    func = op_dict[op]
    if func == '?': break 
    print('%d' % int(func(a, b)))
from bisect import bisect_left
 
N = int(input())
Lmat = [int(n) for n in input().split()]
Lmat.sort()
 
sum = 0

for i in range(N):
    for j in range(i + 1, N):
        sum += bisect_left(Lmat, Lmat[i]+Lmat[j]) - (j + 1)
print(sum)

### FIXED CODE ###

A, B= [int(item) for item in input().split()]

temp_res = A - B * 2

if temp_res < 0:
    res = 0
else:
    res = temp_res

print(res)
a = list(map(int,input().split()))
a.sort()
count= 0

if a[2] != a[1] and a[1] != a[0] and a[2] != a[0]:
  sum = a[2]-a[1]
  for i in range(a[2]-a[1]):
    a[1] += 1
    a[0] += 1  
  for i in range(10**12):
    a[0] += 2
    count += 1
    if a[0] >= a[1]:
      break
      
  if a[0] == a[1]:
    print(sum + count)
  elif a[0] > a[1]:
    print(sum + count + 1)

elif a[2] == a[1] and a[1] != a[0]:
  for i in range(10**4):
    a[0] += 2
    count += 1
    if a[0] >= a[1]:
      break
  
  if a[0] == a[1]:
    print(count)
  elif a[0] > a[1]:
    print(count + 1)
    
elif a[0] == a[1] amd a[1] != a[2]:
  print(a[2]-a[1])
  
elif a[1] == a[2] and a[2] == a[0]:
  print(0)
  
  

### FIXED CODE ###

a = list(map(int,input().split()))
a.sort()
count= 0

if a[2] != a[1] and a[1] != a[0] and a[2] != a[0]:
  sum = a[2]-a[1]
  for i in range(a[2]-a[1]):
    a[1] += 1
    a[0] += 1  
  for i in range(10**12):
    a[0] += 2
    count += 1
    if a[0] >= a[1]:
      break
      
  if a[0] == a[1]:
    print(sum + count)
  elif a[0] > a[1]:
    print(sum + count + 1)

elif a[2] == a[1] and a[1] != a[0]:
  for i in range(10**4):
    a[0] += 2
    count += 1
    if a[0] >= a[1]:
      break
  
  if a[0] == a[1]:
    print(count)
  elif a[0] > a[1]:
    print(count + 1)
    
elif a[0] == a[1] and a[1] != a[2]:
  print(a[2]-a[1])
  
elif a[1] == a[2] and a[2] == a[0]:
  print(0)
s,w = int(input().split())
if w > s:
  print("unsafe") 
else:
  print("safe")

### FIXED CODE ###

s,w = map(int,input().split())
if w > s or w == s:
  print("unsafe") 
else:
  print("safe")