Harryxun/stf_run huggingface dataset:
n = int(input())
x = list(map(int, input().split()))

min_energy = None

for p in range(x[-1]):
    energy = 0
    for x_i in x:
        energy += (x_i - p) ** 2
    if min_energy is None:
        min_energy = energy
    else:
        min_energy = min(energy, min_energy)

print(min_energy)



### FIXED CODE ###

n, r = map(int, input().split())

if n >= 10:
    print(r)
else:
    print(r+100*(10-n))
A = input()
N = int(A)


if N ==1:
    print(N) 
elif 1<=N and N<=100 and N%2 == 0:
    a = 0.5
    a = float(a)
elif 1<=N and N<=100 andN % 2 == 1:
    a = (N/2 + 1)/N

print(a)
    

### FIXED CODE ###

A = input()
N = int(A)


if N ==1:
    a = 1
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N%2 == 1:
    a = (N//2 + 1)/N

print(a)
import math
def main():

    N = int(input())

    d = [2 for _ in range(N+1)]
    d[1] = 1

    v = int(math.sqrt(N))s

    for i in range(2, v+1):
        for j in range(i+i, N+1, i):
            if j//i > v: d[j] += 2
            else: d[j] += 1  

    ans = 0
    for i in range(1, N+1):
        ans += i * d[i]
    return ans

if __name__ == '__main__':
    print(main())

### FIXED CODE ###

import math
import collections
def main():

    N = int(input())
    d = dict()
    for i in range(1, N+1):
        d[i] = 0

    ans = 0
    for i in range(1, N+1):
        p = N//i
        ans += p * (p+1)//2 * i
    return ans

if __name__ == '__main__':
    print(main())
A = input()
B = input()
C = input()

count5 = 0
count7 = 0

if A == "5":
    count5 = count5 + 1
elif A == "7":
    count7 = count7 + 1

if B == "5":
    count5 = count5 + 1
elif B == "7":
    count7 = count7 + 1
if C == "5":
    count5 = count5 + 1
elif C == "7":
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s = input().split()

count5 = 0
count7 = 0
 
if s[0] == "5":
    count5 = count5 + 1
if s[0] == "7":
    count7 = count7 + 1
if s[1] == "5":
    count5 = count5 + 1
if s[1] == "7":
    count7 = count7 + 1
if s[2] == "5":
    count5 = count5 + 1
if s[2] == "7":
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")
n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[]
sum=0
res=0
for i in range(m):
  d,e=map(int,input().split())
  b.append([e,d])
a.sort()
b.sort()
b.reverse()
for i in range(1,m):
  b[i][1]+=b[i-1][1]
m=0
if b[0][1]>0 and b[0][0]>a[0]:
  a[0]=b[0][0]
if n>=2:
  for i in range(1,n):
    while i>b[m][1]-1:
      m+=1
    if b[m][0]>a[i]:
      a[i]=b[m][0]
    else:
      break
for i in range(n):
  res+=a[i]
print(res)


### FIXED CODE ###

n,m=map(int,input().split())
a=list(map(int,input().split()))
b=[]
sum=0
res=0
for i in range(m):
  d,e=map(int,input().split())
  b.append([e,d])
a.sort()
b.sort()
b.reverse()

for i in range(1,m):
  b[i][1]+=b[i-1][1]

id=0
if b[0][1]>0 and b[0][0]>a[0]:
  a[0]=b[0][0]
if n>=2:
  for i in range(1,n):
    while i>b[id][1]-1:
      id+=1

      if id>m-1:
        break
    if id>m-1:
      break
    if b[id][0]>a[i]:
      a[i]=b[id][0]
    else:
      break
for i in range(n):
  res+=a[i]
print(res)
import fractions
A, B, C, D = map(int, input().split())
CD = C * D // fractions.gcd(C,D)
def n_div(k):
  return B // k - (A-1) // k
ans = B - A + 1 - n_div(C) - n_div(D) + n_div(CD)
print(ans)

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
ans = True
b = 999999
if ans == True:
  for i, x in enumerate(H[::-1]):
    if i != 0:
      if x <= b:
        b = x
      elif (x-1) <= b:
        b = x-1
      else:
        ans = False
        break
    else:
      b = x
if ans:
  print("Yes")
else:
  print("No")
a=int(input())
b=list(input())
c=0
for i in range(a):
  if b[i]=="A":
    if b[i+1]=="B":
    else:
      pass
      if b[i+2]=="C":
        c+=1
      else:
        pass
  else:
    pass
print(c)


### FIXED CODE ###

a,b=map(int,input().split())
if b<=a*500:
  print("Yes")
else:
  print("No")
N = int(input())
L = list(map(int,input().split()))
cnt = 0
for n in range(n):
  if (i + 1) % 2 == 1 and L[n] % 2 == 0:
    cnt += 1
    
print(cnt)

### FIXED CODE ###

N = int(input())
L = list(map(int,input().split()))
cnt = 0
for n in range(N):
  if (n + 1) % 2 == 1 and L[n] % 2 == 1:
    cnt += 1
    
print(cnt)
n=int(input())
k=0
for i in range(n):
    v=map(int,input().split())
    c=map(int,input().split())
    if v>c:
        k += (v-c)
print(k)


### FIXED CODE ###

n=int(input())
k=0
v=list(map(int,input().split()))
c=list(map(int,input().split()))
for i in range(n):
    if (v[i]-c[i])>0:
        k += (v[i]-c[i])
print(k)
input();a=list(map(int,input().split()))
print(sum([a.count(i) if (i-a.count(i))>(a.count(i)-i) else abs(i-a.count(i)) for i in set(a)]))

### FIXED CODE ###

import math
a,b=map(int,input().split())
print(math.ceil((a+b)/2))
#!/usr/bin/env python3
import sys


def solve(N: int, M: int):
    t = N + M
    return t * (t - 1) // 2 - N * M


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    print(solve(N, M))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(N: int, M: int):
    t = N + M
    return t * (t - 1) // 2 - N * M


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    M = int(next(tokens))  # type: int
    print(solve(N, M))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()
import sys
sys.setrecursionlimit(10000000000000000)
N, M = map(int, input().split())
T = {}
D = [0 for _ in range(N+1)]
P = [0 for _ in range(N+1)]
root_id = {i for i in range(1, N+1)}
for _ in range(N+M-1):
    a, b = map(int, input().split())
    if a not in T:
        T[a] = [b]
    else:
        T[a].append(b)
    if b in root_id:
        root_id.remove(b)
root_id = root_id.pop()

def setdep(i, p, d):
    if D[i] == 0:
        D[i] = d
        P[i] = p
    else:
        if D[i] > d:
            T[p].remove(i)
            return None
        else: # D[i] < d:
            T[P[i]].remove(i)
            P[i] = p
    if i not in T:
        return None
    for j in T[i]:
        setdep(j, i, d+1)

setdep(root_id, 0, 1)
for p in P[1:]:
    print(p)

### FIXED CODE ###

N, A, B = map(int, input().split())
print(min(A, B), end=' ')
print(max(A+B-N, 0))
n1 = int(input())
n2 = int(input())

#print(n1)
#print(n2)

if n1 == 1:
  if n2 == 2:
    print("3")
  else:
    print("2")
else n1 == 2:
  if n2 == 1:
    print("3")
  else:
    print("1")
else n1 ==3:
  if n2 == 1:
    print("2"):
  else:
    print("1"):


### FIXED CODE ###

n1 = int(input())
n2 = int(input())
 
#print(n1)
#print(n2)
 
if n1 == 1:
  if n2 == 2:
    print("3")
  else:
    print("2")
elif n1 == 2:
  if n2 == 1:
    print("3")
  else:
    print("1")
elif n1 ==3:
  if n2 == 1:
    print("2")
  else:
    print("1")
import math
while True:
    n = int(input())
    score = [ int(i) for i in input().split(" ") ] 
    average = sum(score) / n
    if n == 0:
        break
    else:
        a2 = 0
        for s in score:
            a2 += (s - average) ** 2

        print("{:.8f}".format(math.sqrt(a2) / n ), end ="\n")

### FIXED CODE ###

import math
while True:
    n = int(input())
    if n == 0:
        break
    s = [int(i) for i in input().split(" ")]
    m = sum(s) / n
    print("{:.8f}".format(math.sqrt(sum([(x-m) ** 2 for x in s]) / n)))
words = input()
if words[-1] != s:
  words += 's'
else:
  words += 'es'
print(words)
  
 
  

### FIXED CODE ###

words = input()
if words[-1] != "s":
  words += "s"
else:
  words += "es"
print(words)
a,b = int(input().split())


if a*b%2 == 0:
  print("No")
  
else:
  print("Yes")

### FIXED CODE ###

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

if a*b%2 == 0:
  print("No")

else:
  print("Yes")
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

ans = 1
mn = np.inf
for i, h in enumerate(H):
    if mn > abs(A - (T - h * 0.006)):
        ans = i+1
        mn = abs(A - (T - h * 0.006))
print(ans)

### FIXED CODE ###

import numpy as np

N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

ans = 1
mn = np.inf
for i, h in enumerate(H):
    if mn > abs(A - (T - h * 0.006)):
        ans = i+1
        mn = abs(A - (T - h * 0.006))
print(ans)
x=int(input())
y=0
while True:
  z=x+y**5
  if z**(1/5)==int(z**(1/5)):
    print(int(z**(1/5)), y)
    exit()
  z=x-y**5
  if z**(1/5)==int(z**(1/5)):
    print(int(z**(1/5)), -y)
    exit()
  y+=1
  

### FIXED CODE ###

x=int(input())
for i in range(-118,120):
  for j in range(-119,1119):
    if i**5-j**5==x:
      print(i,j)
      exit()
a, b, c = map(int, input() .split())
e = []
for i in range(a, b+1):
    d = i % c
    if d == 0:
        e.append(i)
print(len(e))

### FIXED CODE ###

a, b, c = input() .split()
print("A" + b[0] + "C")
ar = list(map(int,input().split(" ")))
while True:
    count = 0
    br = list(str(a))
    for r in br:
        if int(r) in ar:
            count += 1
    if count == 0:
        print(a)
        break
    else:
        a += 1

### FIXED CODE ###

a,b = map(int,input().split(" "))
ar = list(map(int,input().split(" ")))
while True:
    count = 0
    br = list(str(a))
    for r in br:
        if int(r) in ar:
            count += 1
    if count == 0:
        print(a)
        break
    else:
        a += 1
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

nm = list(map(int, input().split()))
n = nm[0]
m = nm[1]

ans = 1

uf = UnionFind(n)
for i in range(m):
    friends = list(map(int, input().split()))
    uf.union(friends[0]-1,friends[1]-1)
    if ans < uf.size(friends[0]-1):
        ans = uf.size(friends[0]-1)
print(ans)

### FIXED CODE ###

s = input().split()
t = int(s[1])*int(s[2])
if (int(s[0]) <= t):
    print("Yes")
else:
    print("No")
H,W,h,w=map(int, input().split())
if h*2<H+1 or w*2<W+1:
    print("No")
else:
    print("Yes")
    A=[[0]*W for _ in range(H)]
    for i in range(h):
        for j in range(w):
            A[-1-i][-1-j]=-1
    A[-1][-1]=1
    A[-1][-1-w]=1
    A[-1-h][-1]=1
    for i in range(H)[::-1]:
        for j in range(W-1)[::-1]:
            A[i][j+1]-=A[i][j]
    for i in range(H-1)[::-1]:
        for j in range(W)[::-1]:
            A[i+1][j]-=A[i][j]
    for i in range(H):
        print(*A[i])

### FIXED CODE ###

def solve(W,w):
    A=[1]*W
    for i in range(W-1,w-1,-1):
        A[i-w]=A[i]+1
    A[w-1::w]=[-i for i in range(1,W//w+1)]
    for i in range(W-2,-1,-1):
        A[i+1]-=A[i]
    return A

H,W,h,w=map(int, input().split())
if W%w:
    print("Yes")
    A=solve(W,w)
    for _ in range(H):
        print(*A)
elif H%h:
    print("Yes")
    A=solve(H,h)
    for i in range(H):
        print(*[A[i]]*W)
else:
    print("No")
n, m = map(int, input().split())

if m%2 == 0:
    for i in range(m//2):
        print(1+i, 1+m-i)
        print(1+m+i, m-i)

else:
    center = (n+2-1)//2
    for i in range(m//2):
        print(1+i, center-i)
        print(center+1+i, n-i)
    print(i+m//2+1, i+m//2+2)


### FIXED CODE ###

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

right = 2*m+1

if m%2 == 0:
    for i in range(m//2):
        print(1+i, 1+m-i)
        print(2+m+i, right-i)

else:
    center = m+1
    for i in range(m//2):
        print(1+i, center-i)
        print(center+1+i, right-i)
    print(m//2+1, m//2+2)
N, T = map(int, input().split())
cage,cage2=[],[]
for i in range(N):
  c, t = map(int, input().split())
  if t<=T:
	cage.append(c)
if cage is None:
  print("TLE")
else:
  print(min(cage))

### FIXED CODE ###

a = int(input())
if a==1:
  print("Hello World")
else:
  A = int(input())
  B = int(input())
  print(A+B)
import sys
sys.setrecursionlimit(10**5)
n, m = map(int, input().split())
adjacent_list = [[] for i in range(n + 1)]
for i in range(m):
    x, y, z = map(int,input().split())
    adjacent_list[x].append(y)
    adjacent_list[y].append(x)
##結局、グラフが何個あるか数える
finished = set()
ans = 0
def dfs(node):
    global finished
    finished.add(node)
    for i in adjacent_list[node]:
        if i not in finished:
            dfs(i)

while len(finished) != n:
    for i in range(1,n+1):
        if i not in finished:
            dfs(i)
            ans += 1
print(ans)




### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
n, m = map(int, input().split())
adjacent_list = [[] for i in range(n + 1)]
for i in range(m):
    x, y, z = map(int,input().split())
    adjacent_list[x].append(y)
    adjacent_list[y].append(x)
##結局、グラフが何個あるか数える
finished = set()
ans = 0
def dfs(node):
    global finished
    finished.add(node)
    for i in adjacent_list[node]:
        if i not in finished:
            dfs(i)

while len(finished) != n:
    for i in range(1,n+1):
        if i not in finished:
            dfs(i)
            ans += 1
print(ans)
#coding:utf-8
import math

r = int(input())

print(str(format(r * 2 * math.pi, ".6f")) + " " + str(format(r ** 2 * math.pi, ".6f")))


### FIXED CODE ###

#coding:utf-8
import math

r = float(input())

print(str(format(r ** 2 * math.pi, ".6f")) + " " + str(format(r * 2 * math.pi, ".6f")))
#d  tree
n,k =  [int(i) for i in input().split()]
a   =  [int(i)-1 for i in input().split()]

#this is directed tree so every node is not reached yet
def dfs(u, d):
    change = 0
    if d>k:
        d = 1
        change += 1
    for v in edges[u]:
        if u!=v:
            change += dfs(v, d+1)
    return change


cnt = 0
if a[0]!=0:
    a[0] = 0
    cnt += 1

edges = [[] for _ in range(n)]
for i in range(0,n):
    pa = a[i]
    edges[a[i]].append(i)   

cnt += dfs(0,0)    
print(cnt)

### FIXED CODE ###

#d  tree
#code自体はあっている。ただ、そもそもアルゴリズムが違う。
#下から調べていかないと最適でない。
#Right Answer. 
import sys
sys.setrecursionlimit(2 * 10 ** 5 + 10)

n,k =  [int(i) for i in input().split()]
a   =  [int(i)-1 for i in input().split()]

#this is directed tree so every node is not reached yet
#return the depth from its lowest bottom
def dfs(u):
    global cnt
    depth = 0 #default, this value is used when bottom
    
    for v in edges[u]:
        depth = max(depth, (dfs(v)+1)%k) #apply the maximum depth
        #because the edge was alerady cut, by the following procedure
    
    if depth==k-1 and u!=0 and a[u] != 0:
        cnt += 1
        
    return depth


cnt = 0
if a[0]!=0:
    cnt += 1

edges = [[] for _ in range(n)]
for i in range(1,n):
    pa = a[i]
    edges[a[i]].append(i)   

dfs(0)    
print(cnt)
from collections import Counter

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

C = N // (A + B) + (0 if N % (A + B) == 0 else 1)

L = []
Co = Counter()
for n in range(C):
    L += ['b'] * A + ['r'] * B

Co = Counter(L[:N])

print(Co['b'])

### FIXED CODE ###

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

C = N // (A + B)
D = N % (A + B)

R = C * A + min(A, D)
print(R)
n, w = [int(e) for e in input().split()]
d = [[int(e) for e in input().split()] for i in range(n)]
t = {}
t[w] = 0
for i in range(n):
  keys = list(sorted(t.keys()))
  tw, tv = d[i]
  for j in keys:
    nw = j - tw
    if nw < 0:
      break
    nv = t[j] + tv
    if nw in t
      if nv > t[nw]:
        t[nw] = nv
    else:
      t[nw] = nv
print(max(t.values()))

### FIXED CODE ###

n, w = [int(e) for e in input().split()]
d = [[int(e) for e in input().split()] for i in range(n)]
t = {}
t[w] = 0
for i in range(n):
  keys = list(sorted(t.keys()))
  tw, tv = d[i]
  for j in keys:
    nw = j - tw
    if nw < 0:
      continue
    nv = t[j] + tv
    if nw in t:
      if nv > t[nw]:
        t[nw] = nv
    else:
      t[nw] = nv
print(max(t.values()))
num = list(range(86))
num[0] = 2
num[1] = 1

for i in range(2,86):
    num[i] = num[i-2] + num[i-1]

print(num[int(input())])


### FIXED CODE ###

num = list(range(87))
num[0] = 2
num[1] = 1

for i in range(2,87):
    num[i] = num[i-2] + num[i-1]

print(num[int(input())])
n=int(input())
h[int(i) for i in input().split()]
ans=0
ans1=[]
a=0
while 1:
    for k in range(a,n-1):
        if h[k]>=h[k+1] :
            ans+=1
            a+=1
        else:
            ans1.append(ans)
            ans=0
            a+=1
            break
    if a>=n-1:
        ans1.append(ans)
        break
print(max(ans1))


### FIXED CODE ###

n=int(input())
h=[int(i) for i in input().split()]
ans=0
ans1=[]
a=0
while 1:
    for k in range(a,n-1):
        if h[k]>=h[k+1] :
            ans+=1
            a+=1
        else:
            ans1.append(ans)
            ans=0
            a+=1
            break
    if a>=n-1:
        ans1.append(ans)
        break
print(max(ans1))
def popcount(n):
	res=0
	while n > 0:
		res += n%2;
		n /= 2
	return res
n=0
def init_seg(_n):
	n=1
	while(n < _n) n *= 2

data=[0]*n
datb=[0]*n

def add(a,b,x,k,l,r):
	if a <=l and r <= b:
		data[k] += x
	else:
		datb[k] += (min(b,r) - max(a,l))*x
		add(a,b,x,2*k+1,l,(l+r)/2)
		add(a,b,x,2*k+2,(l+r)/2,r)

def sum(a,b,k,l,r):
	if b <=l or r <=a:
		return 0
	elif a <= l and r <= b:
		return data[k] * (r - l) + datb[k]
	else:
		res=(min(b,r) - max(a,l)) * data[k]
		res+=sum(a,b,2*k+1,l,(l+r)/2)
		res+=sum(a,b,2*k+2,(l+r)/2,r)
		return res

init_seg(1e5)
for i in range(n):
	add(i,i+1,0,0,0,n)

N,C=map(int,input().split())
for i in range(N):
	s,t,c=map(int,input().split())
	add(s,t,2**(c-1),0,0,n)

res=0
for i in range(1:1e5):
	prev=sum(i-1,i,0,0,n)
	curr=sum(i,i+1,0,0,n)
	if prev == curr:
		res = max(res, popcount(curr))
	else:
		res = max(res, popcount(curr | prev))

print(res)



### FIXED CODE ###

N,C=map(int,input().split())
f=[[0]*int(1e5) for _ in range(C)]

for i in range(N):
	s,t,c=map(int,input().split())
	f[c-1][s-1:t]=[1]*(t-s+1)

print(max(map(sum,zip(*f))))
a = map(float, raw_input().split())

Pi = float(3.141592658979)

print("%f %f" % (a*a*Pi, 2*a*Pi))

### FIXED CODE ###

import math

a = float(input())

print("%f %f" % (a*a*math.pi, 2*a*math.pi))
N = int(input())
for n in reversed(range(1, int(N**0.5))):
  if N%n==0:
    t = n+N//n
    break
print(t-2)

### FIXED CODE ###

N = int(input())
m = 100000000000000
for i in range(1, int(N**0.5)+1):
  if N%i == 0:
    m = min(m, i+N//i)
print(m-2)
n = int(input())


def prime(n):
    if n == 1:
        n += 1
    while True:
        flag = 0
        for k in range(2, int(n**0.5) + 1):
            if n % k == 0:
                flag = 1
                break
        if flag == 0:
            return n
        n += 1


ans = prime(n)
print(ans)


### FIXED CODE ###

a = input().split()
print(a[1]+a[0])
while 1:
     x, y = map(int, raw_input().split())
     if x == 0 and y == 0:
         break
     else:
         if x>y:
          print '%s %s' % (y,x)
         else:
          print '%s %s' % (x,y)
    

### FIXED CODE ###

while 1:
   x, y = map(int, raw_input().split())
   if x == 0 and y == 0:
      break
   elif x > y:
      print '%s %s' % (y,x)
   else:
      print '%s %s' % (x,y)
ans = 0
count = 0
for i in 100:
    a,b=input().split()
    list.append((int(a), int(b)))
l = list[0][0]
for i in l:
  if list[i][0] == list[i][1]:
    count += 1
    if count >= 3:
      and = 1
  else:
    count = 0

if ans == 1:
  print("Yes")
else print("No")


### FIXED CODE ###

ans = "No"
count = 0
n = int(input())
for i in range(n):
  a,b=map(int,input().split())
  if a == b:
    count += 1
    if count >= 3:
        ans ="Yes"
  else:
    count = 0

print(ans)
#coding:utf-8

data = sorted([int(i) for i in input().split()])
s=""
for x in data:
	s+=(str(x)+" ")
print(s)

### FIXED CODE ###

#coding:utf-8

data = sorted([int(i) for i in input().split()])
s=""
for x in data:
	s+=(str(x)+" ")
print(s[0:len(s) - 1])
import numpy as np
N=int(input())
A=list(map(int, input().split()))
A=np.array(A)
mod=10**9+7
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)

def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

def lcm_core(a,b):
    g = gcd_core(a,b)
    return ((a*b)//g)

def lcm(arr):
    l = lcm_core(arr[0],arr[1])
    for i in range(2,len(arr)):
        l = lcm_core(l,arr[i])
    return l

LCM=lcm(A)
#print(LCM)
print((LCM//A).sum()%mod)

### FIXED CODE ###


#かけて最小公倍数になる　そのために必要な数がB
from fractions import gcd
N=int(input())
if N==1:
  print(1)
  exit()

mod=10**9+7
A=list(map(int, input().split()))
def lcm(a,b):
  return a//gcd(a,b)*b

if N==2:
  LCM=lcm(A[0],A[1])
  ans=((LCM//A[0])+(LCM//A[1]))%mod
  print(ans)
  exit()

LCM=1
#LCM%=mod
for a in A:
  LCM=lcm(LCM, a)
  #LCM%=mod
  
#print(LCM)
ans=0
for a in A:
  ans+=LCM//a
  #ans%=mod

print(int(ans%mod))
date=str(input())
data.replace("2017","2018")

### FIXED CODE ###

date=str(input())
print(date.replace("2017","2018",1))
t, x = map(int, input.split()) 
print(t/x)

### FIXED CODE ###

t, x = map(int, input().split()) 
print(t/x)
N=int(input())
result=0
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      result=1
if result=1:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N=int(input())
result=0
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      result=1
if result==1:
  print('Yes')
else:
  print('No')
x = int(input())
n = int(input())

p = []
for i in range(n):
    p.append(int(input()))

for i in range(100):
    if (x - i) not in p:
        print(x - i)
        exit()
    elif (x + i) not in p:
        print(x + i)
        exit()
    else:
        continue

### FIXED CODE ###

str1 = input()
lst1 = str1.split()
x = int(lst1[0])
n = int(lst1[1])

string = input()
list = string.split()
p = []
for num in list:
    p.append(int(num))

for i in range(100):
    if (x - i) not in p:
        print(x - i)
        break
    elif (x + i) not in p:
        print(x + i)
        break
    else:
        continue
a, b, c = map(int(input().split()))
if a <= c and c <= b:
	print("Yes")
else:
	print("No")


### FIXED CODE ###

a, b, c = map(int, input().split())
if a <= c and c <= b:
	print("Yes")
else:
	print("No")
import math
a, b = map(int, input().split())
ans = (a * b) // math.gcd(a, b)
print(ans)


### FIXED CODE ###

import fractions
a, b = map(int, input().split())
ans = (a * b) //fractions.gcd(a, b)
print(ans)
list=[int(i) for i in input().split()]

if list[0]>list[1]:
    a=list[0]
    b=list[1]
else:
    b=list[0]
    a=list[1]    

if a%b==0:
    print (b)
else:
    while a%b!=0:
        c=a%b
        a=b
        b=c

    print(c)



### FIXED CODE ###

list=[int(i) for i in input().split()]

if list[0]>list[1]:
    a=list[0]
    b=list[1]
else:
    b=list[0]
    a=list[1]    


if a%b==0:
    print(b)
else:
    while b>0:
        c=a%b
        a=b
        b=c
    print(a)