Harryxun/stf_run huggingface dataset:
S, T = input().split()
print(f'{T}{S}')

### FIXED CODE ###

S, T = input().split()
print(T+S)
n = int(input())
alist=list(map(int,input().split()))
mina = min(alist[0],alist[1])
minb = min(alist[-2],alist[-1])
minc = alist[-1]
core = 0
for i in range(n-3):
  core +=min(alist[i],alist[i+1],alist[i+2])
print(core + mina + minb + minc)

### FIXED CODE ###

n = int(input())
alist=list(map(int,input().split()))
alist.insert(0,1e7)
alist.append(1e7)
core = 0
for i in range(n):
  core +=min(alist[i],alist[i+1])
print(core)
s=''.join(sorted(input()))
t=''.joinsorted(input(),reverse=True))
print('YNeos'[s>=t::2])

### FIXED CODE ###

s=''.join(sorted(input()))
t=''.join(sorted(input(),reverse=True))
print('YNeos'[s>=t::2])
c = input()
if c>=A and c<=Z:
    print('A')
else:
    print('a')

### FIXED CODE ###

c = input()
if c>='A' and c<='Z':
    print('A')
else:
    print('a')
def inpl(): return list(map(int, input().split()))
W, H, x, y = inpl()
if x > W/2:
    x = W-x
if y > H/2:
    y = H-y

a = W*y
b = H*x
if W/H == x/y:
    print(H*W/2, int(W/2==x))
elif a == b:
    print(a, 1)
elif a > b:
    print(a, 0)
else:
    print(b, 0)

### FIXED CODE ###

W, H, x, y = map(int, input().split())
print(H*W/2, int((2*y == H)&(2*x == W)))
n = int(input())
a =list(map(int, input().split()))
q = int(input())
b = [0]*q
c = [0]*q
for i in range(q):
    b[i],c[i]=map(int, input().split())

at = [0]*10**5
sum = 0

for i in a:
    at[i]= at[i]+1
    sum = sum+i


for  i in range(q):
    m= at[b[i]]
    at[b[i]]=0
    at[c[i]]=at[c[i]]+m

    sum = sum + (c[i]-b[i])*m
    print(sum)

### FIXED CODE ###

n = int(input())
a =list(map(int, input().split()))
q = int(input())
b = [0]*q
c = [0]*q
for i in range(q):
    b[i],c[i]=map(int, input().split())

at = [0]*(10**5+100)
sum = 0

for i in a:
    at[i]= at[i]+1
    sum = sum+i


for  i in range(q):
    m= at[b[i]]
    at[b[i]]=0
    at[c[i]]=at[c[i]]+m

    sum = sum + (c[i]-b[i])*m
    print(sum)
N=int(input())
g=[[] for i in range(N)] 
cnt=0
for i in range(N):
  s=input()
  for j in range(N):
    if s[j]=='1':
      g[i].append(j)
      cnt+=1
w=cnt//2

color=[0]*N #color[i]:点iの色(1 or -1)。但し塗られていないときは0とする

def f(v,c):
    #頂点vに隣接する頂点全てを塗るあるいは判定する
    color[v] = c
    for i in range(len(g[v])):
        if color[g[v][i]]==c:
            return False
        elif color[g[v][i]]==0 and not f(g[v][i],-c):
            #(g[v][i]がまだ塗られていない　かつ　そこを-cで塗っても問題ない) ではないなら
            return False
    return True

def warshall(d,n):
  for k in range(n):
    for i in range(n):
      for j in range(n):
        d[i][j]=min(d[i][j],d[i][k]+d[k][j])
  return d

k=1
for i in range(N):
  if color[i]==0:
    if not f(i,1):
      k=-1

if k==0:
  print(-1)
else:
  d=[[float('inf')]*N for i in range(N)]
  for i in range(N):
    for j in g[i]:
      d[i][j]=1
  for i in range(N):
    d[i][i]=0
  A=warshall(d,N)
  ans=0
  for i in range(N):
    for j in range(N)
      ans=max(ans,d[i][j])
  print(ans+1)

### FIXED CODE ###

N=int(input())
g=[[] for i in range(N)] 
cnt=0
for i in range(N):
  s=input()
  for j in range(N):
    if s[j]=='1':
      g[i].append(j)
      cnt+=1
w=cnt//2

color=[0]*N #color[i]:点iの色(1 or -1)。但し塗られていないときは0とする

def f(v,c):
    #頂点vに隣接する頂点全てを塗るあるいは判定する
    color[v] = c
    for i in range(len(g[v])):
        if color[g[v][i]]==c:
            return False
        elif color[g[v][i]]==0 and not f(g[v][i],-c):
            #(g[v][i]がまだ塗られていない　かつ　そこを-cで塗っても問題ない) ではないなら
            return False
    return True

def warshall(d,n):
  for k in range(n):
    for i in range(n):
      for j in range(n):
        d[i][j]=min(d[i][j],d[i][k]+d[k][j])
  return d

k=1
for i in range(N):
  if color[i]==0:
    if not f(i,1):
      k=-1

if k==-1:
  print(-1)
else:
  d=[[float('inf')]*N for i in range(N)]
  for i in range(N):
    for j in g[i]:
      d[i][j]=1
  for i in range(N):
    d[i][i]=0
  A=warshall(d,N)
  ans=0
  for i in range(N):
    for j in range(N):
      ans=max(ans,d[i][j])
  print(ans+1)
from math import gcd

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

L = [0]
R = [0]

for i in range(N):
    L.append(gcd(L[i], A[i]))  # 0, gcd(0,A[0]), gcd(0,A[0],A[1]) , ...
    R.append(gcd(R[i], A[N - i -1])) # 0 , gcd(0, A[N-1]), gcd(0, A[N-1], A[N-2]))..

R.reverse() # R is gcd(0,...A[0]), gcd(0,...A[1]),....
# pairs are 
#  L     :R
#  0    : (0,A[N-1],A[n-2], ... A[1])
#  A[0] : (0,A[N-1],A[n-2], ... A[2])
#  ...
#  A[0,1,..N-3] :(0,A[N-1]
#  A[0,1,..N-2] :(0)
print(max( (gcd(L[i], R[i+1]) for i in range(N))))



### FIXED CODE ###

from fractions import gcd

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

L = [0]
R = [0]

for i in range(N):
    L.append(gcd(L[i], A[i]))  # 0, gcd(0,A[0]), gcd(0,A[0],A[1]) , ...
    R.append(gcd(R[i], A[N - i -1])) # 0 , gcd(0, A[N-1]), gcd(0, A[N-1], A[N-2]))..

R.reverse() # R is gcd(0,A[N-1]...A[0]), gcd(0,A[N-1]...A[1]),....
# pairs are 
#  L     :R
#  0    : (0,A[N-1],A[n-2], ... A[1])
#  A[0] : (0,A[N-1],A[n-2], ... A[2])
#  ...
#  A[0,1,..N-3] :(0,A[N-1]
#  A[0,1,..N-2] :(0)
print(max( (gcd(L[i], R[i+1]) for i in range(N))))
import numpy as np
x,y,z,k = map(int,input().split())
a = np.array(list(map(int,input().split())))
b = np.array(list(map(int,input().split())))
c = np.array(list(map(int,input().split())))
ans = []
for i in range(x):
    for j in range(y):
        for l in range(z):
            ans.append(a[i] + b[j] + c[l])
ans = np.sort(ans)[::-1]
for i in range(k):
    print(ans[i])

### FIXED CODE ###

x,y,z,k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))
ans = []
for i in range(x):
    for j in range(y):
        ans.append(a[i]+b[j])
ans.sort(reverse=True)
ans = ans[:k]
ans2 = []
for i in range(len(ans)):
    for j in range(z):
        ans2.append(ans[i]+c[j])
ans2.sort(reverse=True)
for i in range(k):
    print(ans2[i])
a = input() + "$"
n = len(a)

alph = "abcdefghijklmnopqrstuvwxyz"
dp = [0] * (n + 1)

next_ = [[-1] * (n + 1) for i in range(26)]
for char in range(26):
    tmp = - 1
    for i in range(n)[::-1]:
        if a[i] == alph[char]:
            tmp = i + 1
        next_[char][i] = tmp
# print(next_)

def solve(i):
    if dp[i] != 0:
        return dp[i]
    tmp = n + 1
    for char in range(26):
        if next_[char][i] == -1:
            dp[i] = 1
            return dp[i]
        tmp = min(solve(next_[char][i]) + 1 , tmp)
    dp[i] = tmp
    return dp[i]

solve(0)
ans = []
i = 0
while True:
    for char in range(26):
        if dp[i] == dp[next_[char][i]] + 1:
            ans.append(alph[char])
            i = next_[char][i]
            break
    else:
        break

print("".join(ans))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

a = input() + "$"
n = len(a)

alph = "abcdefghijklmnopqrstuvwxyz"
dp = [-1] * (n + 1)

next_ = [[-1] * (n + 1) for i in range(26)]
for char in range(26):
    tmp = - 1
    for i in range(n)[::-1]:
        if a[i] == alph[char]:
            tmp = i + 1
        next_[char][i] = tmp


def solve():
    for i in range(n + 1)[::-1]:
        tmp = n + 1
        for char in range(26):
            if next_[char][i] == -1:
                dp[i] = 1
                break
            tmp = min(dp[next_[char][i]] + 1 , tmp)
        else:
            dp[i] = tmp

solve()
ans = []
i = 0
while True:
    for char in range(26):
        if next_[char][i] == -1:
            ans.append(alph[char])
            print("".join(ans))
            exit()
        if dp[i] == dp[next_[char][i]] + 1:
            ans.append(alph[char])
            i = next_[char][i]
            break
r, g, b = map(int, input().split())
a = 100 * r + 10 * g + b
if a % 4 = 0:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

r, g, b = map(int, input().split())
a = 100 * r + 10 * g + b
if a % 4 == 0:
    print("YES")
else:
    print("NO")
N = int(input())
A=[]
for i in range(N):
    a=int(input())
    A.append(a)
c=0
while(True):
    b=0
    for i in A:
        if i%2==0:
            b=b+1
        if b==N:
            for j in range(N):
                A[j]=A[j]/2
            c=c+1
    if b!=N:
        break
print(c)

### FIXED CODE ###

S = list(input())
print(S.count("1"))
n, k = map(int, input().split())
a = list(map(int, input().split()))

mod = 10 ** 9 + 7
k = k % mod
# 配列内で自身より小さい数の個数　前後別に求める
b = [[0, 0] for _ in range(n)]
for i in range(n):
    for j in range(n):
        if a[i] > a[j]:
            if i > j:
                b[i][0] += 1
            elif i < j:
                b[i][1] += 1
    b[i][0] = b[i][0] % mod
    b[i][1] = b[i][1] % mod
ans = 0
# kまでの和　後ろの数用
sigmakp = (((k * (k+1)) % mod) / 2) % mod
#sigmakp = int(sigmakp)
# k-1までの和　前の数用
sigmakn = (((k * (k-1)) % mod) / 2) % mod
#sigmakn = int(sigmakn)

for i in range(n):
    mae = (sigmakp * b[i][1]) % mod
    ushiro = (sigmakn * b[i][0]) % mod
    ans = ((mae + ushiro) % mod + ans) % mod 
print(int(ans)

### FIXED CODE ###

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

mod = 10 ** 9 + 7
k = k % mod
# 配列内で自身より小さい数の個数　前後別に求める
b = [[0, 0] for _ in range(n)]
for i in range(n):
    for j in range(n):
        if a[i] > a[j]:
            if i > j:
                b[i][0] += 1
            elif i < j:
                b[i][1] += 1
    b[i][0] = b[i][0] % mod
    b[i][1] = b[i][1] % mod
ans = 0

if k%2 == 0:
    sigmakp = (int(k/2) * (k+1)) % mod
    sigmakn = (int(k/2) * (k-1)) % mod
else:
    sigmakp = (int((k+1)/2) * k) % mod
    sigmakn = (int((k-1)/2) * k) % mod

for i in range(n):
    mae = (sigmakp * b[i][1]) % mod
    ushiro = (sigmakn * b[i][0]) % mod
    ans = ((mae + ushiro) % mod + ans) % mod 
print(ans)
s=[int(input()) for i in range(4)]

ans=s[1]*s[2]-s[2]*s[3]-s[1]*s[4]+s[3]*s[4]
print(ans)

### FIXED CODE ###

H,W=map(int,input().split())
h,w=map(int,input().split())
lw=H*W-(h*W+H*w-h*w)
print(lw)
N = int(input())
S = input()
ans = []
for s in S:
    if ord(s) + N > 90:
        ans.append(chr(ord(s)+(N-26)))
    else:
        ans.append(chr(ord(s)+N))
for j in range(len(S)):
    print(ans, end ="")

### FIXED CODE ###

n = int(input())
s = input()
ans = []

for i in range(len(s)):
    temp = ord(s[i]) +n
    if temp > 0x5a:
        temp -= 26
    ans.append(chr(temp))
    
for k in range(len(ans)):
    print(ans[k], end = "")
a, b, c = input().split()
if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
print(’YES’)
else:
print(’NO’)

### FIXED CODE ###

a, b, c = input().split()

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
	print("YES")
else:
	print("NO")
N = int(input())
p = list(map(int,input().split()))
ans = 0
for i in range(N):
  if p[i] == i+1:
    p[i] = -1
  else:
    p[i] = 0
    
for j in range(N):
  if p[j] == -1:
    ans += 1
    p[j] = 0
    p[j+1] = 0
print(ans)
    

### FIXED CODE ###

N = int(input())
p = list(map(int,input().split()))
ans = 0
for i in range(N):
  if p[i] == i+1:
    p[i] = -1
  else:
    p[i] = 0
    
for j in range(N-1):
  if p[j] == -1:
    ans += 1
    p[j] = 0
    p[j+1] = 0
if p[N-1] == -1:
  ans += 1
print(ans)
n, m = map(int, input().split())

w = [[0] for _ in range(10000)]

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

money = 0
l = []
for i in range(m):
  l += w[i]
  x = max(l)
  l.remove(x)
  money += x

print(money)

### FIXED CODE ###

from heapq import heappush, heappop

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

w = [[] for _ in range(10**5)]

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

money = 0
l = []
for i in range(m):
  for item in w[i]:
    heappush(l, item * (-1))
  if len(l) == 0:
    continue

  money += heappop(l) * (-1)

print(money)
import itertools

def sign(num):
    if num < 0:
        return -1
    elif num > 0:
        return 1
    else:
        return 0

N = input()
a_i = list(map(int, input().split()))

a_sum = [a_i[0]]
for i, a in enumerate(a_i[1:]):
    i += 1
    a_sum.append(a_sum[-1]+a)

signs = [1, -1]
for i, sum_i in enumerate(a_sum):
    if sum_i != 0:
        signs[i%2] = sign(sum_i)
        signs[i%2+1] = -sign(sum_i)
        break

a_sum = 0
changes = 0
for i, a in enumerate(a_i):
    a_sum += a
    if sign(a_sum) != signs[i%2]:
        changes += abs(a_sum) + 1
        a_sum = signs[i%2]
print(changes)

#
# for i, sum_i in enumerate(a_sum):
#     if i == 0:
#         signs = [sign(sum_i), -sign(sum_i)]
#     elif sign(sum_i) != signs[i%2]:
#         a_sum[i:] = [num + (abs(sum_i) + 1) * signs[i%2] for num in a_sum[i:]]
#         changes += abs(sum_i) + 1
#     # print(a_sum)
# print(changes)


### FIXED CODE ###

import itertools

def sign(num):
    if num < 0:
        return -1
    elif num > 0:
        return 1
    else:
        return 0

N = input()
a_i = list(map(int, input().split()))

signs = [-1,1]
a_sum = 0
changes_1 = 0
for i, a in enumerate(a_i):
    a_sum += a
    if sign(a_sum) != signs[i%2]:
        changes_1 += abs(a_sum) + 1
        a_sum = signs[i%2]

signs = [1,-1]
a_sum = 0
changes_2 = 0
for i, a in enumerate(a_i):
    a_sum += a
    if sign(a_sum) != signs[i%2]:
        changes_2 += abs(a_sum) + 1
        a_sum = signs[i%2]

print(min(changes_1,changes_2))
import copy
N=int(input())
a_list=list(map(int,input().split()))
a=set(a_list)
a=list(a)
if 0 in a:
        if len(a) ==2:
            if a_list.count(0)==len(a_list)//3 ora_list.count(0)==len(a_list)//2:
                    print("Yes")
            else:
                    print("No")
        else:
                print("No")
else:
        if len(a)==3:
            a1=a[0]
            a2=a[1]
            a3=a[2]
            if a1 ^ a2 ==a3 and a1^a3==a2 and a2^a3==a1:
                if a_list.count(a1) == a_list.count(a2) == a_list.count(a3):
                        print("Yes")
                else:
                        print("No")
            else:
                print("No")
        else:
            print("No")


### FIXED CODE ###

import copy
N=int(input())
a_list=list(map(int,input().split()))
a=set(a_list)
a=list(a)
if 0 in a:
        if len(a) ==2:
            if a_list.count(0)==len(a_list)//3 or a_list.count(0)==len(a_list)//2:
                    print("Yes")
            else:
                    print("No")
        elif len(a)==1:
            print("Yes")
        else:
                print("No")
else:
        if len(a)==3:
            a1=a[0]
            a2=a[1]
            a3=a[2]
            if a1 ^ a2 ==a3 and a1^a3==a2 and a2^a3==a1:
                if a_list.count(a1) == a_list.count(a2) == a_list.count(a3):
                        print("Yes")
                else:
                        print("No")
            else:
                print("No")
        else:
            print("No")
n=int(input())
A=list(map(int,input()))

c=0
while all(a%2==0 for a in A):
    A=[a/2 for a in A]
    c+=1
print(c)


### FIXED CODE ###

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

c=0
while all(a%2==0 for a in A):
    A=[a/2 for a in A]
    c+=1
print(c)
L = input()

returnVal = (L/3)**3
print(returnVal)

### FIXED CODE ###

L = float(input())

returnVal = (L/3)**3
print(returnVal)
n,m = map(int,(input().split())
          
l=[]
for i in range(m):
	l,r = map(int,input().split())
    li = range(l,r)

for i in li:
	print(i)

	

### FIXED CODE ###

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

ll=[]
rr =[]
for i in range(m):
	l,r = map(int,input().split())
	ll.append(l)
	rr.append(r)

an = min(rr)-max(ll)+1
if an >0:
	print(an)
else:
	print(0)
N, K = map(int, input().split())
A = list( map(int, input().split()) ) #ここでN個受け取る

flags = [0] * 21000
nums = [0] * 21000

for i in range(N):
    flags[A[i]] = 1
    nums[A[i]] += 1
    
s_nums = sorted(nums)
count = 0
ans = 0

if sum(flags) - K > 0:
    for j in range(len(s_nums)):
        if s_nums[j] != 0 and count < sum(flags)-K:
            ans += s_nums[j]
            count += 1
            
    print(ans)
    
else :
    print("0")

### FIXED CODE ###

N, K = map(int, input().split())
A = list( map(int, input().split()) ) #ここでN個受け取る

var = [0] * (N+1)


for i in A:
    var[i] += 1
    
var = sorted(var,  reverse = True )


count = 0
for j in range( K, N+1 ):
    if var[j] == 0:
        break
    
    if var[j] != 0:
        count += var[j]
        
print(count)
from math import ceil
a,b = map(int,input().split())

print(ceil(a,b))

### FIXED CODE ###

from math import ceil

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

print(ceil(a/b))
while True:
    H,W= map(int, input().split())
    s = "#"
    a = H
    b = "."
    for i in range(H):
        if H==0 and W==0:
            break
        elif a==H or a==1:
            x = s*W
            print(x)
            a-=1
        else:
            y = s+b*(W-2)+s
            print(y)
            a-=1
    print("")

### FIXED CODE ###

while True:
    H,W= map(int, input().split())
    if H==0 and W==0:
        break
    s = "#"
    a = H
    b = "."
    for i in range(H):
        if 1<a<H:
            y = s+b*(W-2)+s
            print(y)
            a-=1
        elif a==H or a==1:
            x = s*W
            print(x)
            a-=1                    
    print("")
N = int(input())
S,T = list(input())
ans = ''

for i in range(N):
    ans += S[i]+T[i]

print(ans)


### FIXED CODE ###

N = int(input())
S,T = input().split()
ans = ''

for i in range(N):
    ans += S[i]+T[i]

print(ans)
N,K = map(int,input().split())
A = list(map(int,input().split()))
r = [0]*N
p = 0
q = 1 #現在地
for i in range(min(K,N)):
    q = A[q-1] #次の町
    if r[q-1] == 0:
        p += 1
        r[q-1] += p       
    else:
        p += 1
        y = r[q-1]
        break
z = (K-y) % (p-y)
for i in range(N):
    if r[i] == y+z:
        print(i+1)

### FIXED CODE ###

N,K = map(int,input().split())
A = list(map(int,input().split()))
r = [0]*N
p = 0
q = 1 #現在地
for i in range(K):
    if i == K-1:
        print(A[q-1])
        exit()
    q = A[q-1] #次の町
    if r[q-1] == 0:
        p += 1
        r[q-1] += p       
    else:
        p += 1
        y = r[q-1]
        break
z = (K-y) % (p-y)
for i in range(N):
    if r[i] == y+z:
        print(i+1)
N = int(input())
T,A = map(int,input().split())
H = [int(i) for i in input().split()]
for i in range(N):
  H[i] = abs(T - H[i] * 0.006 - A)
print(H.index(min[H])+1)

### FIXED CODE ###

N = int(input())
T,A = map(int,input().split())
H = [int(i) for i in input().split()]
for i in range(N):
  H[i] = abs(T - H[i] * 0.006 - A)
print(H.index(min(H))+1)
a,b,c = int(input().split())
if a == b != c :
    print("Yes")
elif b == c != a :
    print("Yes")
elif a == c != b :
    print("Yes")
else :
    print("No")


### FIXED CODE ###

a,b,c = map(int,input().split())
if a == b != c :
    print("Yes")
elif b == c != a :
    print("Yes")
elif a == c != b :
    print("Yes")
else :
    print("No")
n = int((

### FIXED CODE ###

n = int(input())
d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    s = input()
    d[s] += 1 
    

p = str(d["AC"])
q = str(d["WA"])
r = str(d["TLE"])
s = str(d["RE"])

print("AC x " + p)
print("WA x " + q)
print("TLE x " + r)
print("RE x " + s)
import re

di = {1:".,!? ",2:"abc",3:"def",4:"ghi"
         ,5:"jkl",6:"mno",7:"pqrs",8:"tuv",9:"wxyz"}
while True:
    str = ""
    line = raw_input()
    if line.endswith("0") is False:
        break
    list = re.split("0+",line)
    for line in list:
        if line is not '' and len(set(line)) < 2:
            first_num = int(line[:1])
            str += di[first_num][(len(line)-1)%len(di[int(line[:1])])]
    if str is not "":
        print str

### FIXED CODE ###

import sys
di = {1:".,!? ",2 :"abc",3:"def",4:"ghi",5:"jkl",6:"mno",7:"pqrs",8:"tuv",9:"wxyz"}
b = input()

for j in range(b):
    a = raw_input()
    count = 0
    le = 999
    for letter in a:
        if(letter == "0"):
            if(le == 999):
                pass
            else:
                sys.stdout.write(di[le][(count-1)%len(di[le])])
                count = 0
                le = 999
        else:
            le = int(letter)
            count += 1
    print ""
a,b,c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
if a>=b:
  if c>=d:
    print(b+d)
  else:
    print(b+c)
else:
  if c>=d:
    print(a+c)
  else:
    print(a+d)

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
if a>=b:
  if c>=d:
    print(b+d)
  else:
    print(b+c)
else:
  if c>=d:
    print(a+d)
  else:
    print(a+c)
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, k = MAP()
a = LIST()
mygcd = gcd(a[0],a[1])

for x in a:
    mygcd = gcd(mygcd,x)
for x in a:
    if x - k >= 0 and ( x - k ) % mygcd == 0:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")

### FIXED CODE ###

from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n, k = MAP()
a = LIST()

if n == 1:
    if a[0] == k:
        print("POSSIBLE")
        exit()
else:
    m = gcd(a[0], a[1])
    for x in a:
        m = gcd(m, x)
    for x in a:
        if x - k >= 0 and ( x - k ) % m == 0:
            print("POSSIBLE")
            exit()
print("IMPOSSIBLE")
n = int(input())
A = set(map(int, input().split()))
#print(A)

def fctr(m):
    pf = {}
    for i in range(2, int(m ** 0.5) + 1):
        while not m % i:
            pf[i] = pf.get(i, 0) + 1
            m //= i
    if m > 1:
        pf[m] = 1
    return pf.keys()

cnt = 0
for a in A:
    for k in fctr(a):
        flg = True
        b = A - set([a])
        if not b:
            flg = False
            break
        elif k in b:
            flg = False
            break
    if flg:
        cnt += 1
print(cnt)

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))
A.sort()
#print(A)
m = max(A)
dp = [0] * (m + 1)

for a in A:
    if dp[a] >= 1:
        dp[a] += 1
    for i in range(2 * a, m + 1, a):
        dp[i] += 2
    dp[a] += 1
print(dp.count(1))
#coding:utf-8
x=input()
print( x**3 )

### FIXED CODE ###

import sys

x = int( sys.stdin.readline() )
print( "{}".format( x**3 ) )
import math


def solve():
    N = int(input())
    print(math.factorial(N) % MOD)


solve()

### FIXED CODE ###

import math
MOD = 10**9 + 7

N = int(input())
print(math.factorial(N) % MOD)
a = int(input())
b = int(input())
if 2800 <= a and a<3200:
    print("red")
else if 3200 <=a and a <=5000:
    print(b)


### FIXED CODE ###

a = int(input())
b = input()
if 2800 <= a and a<3200:
    print("red")
elif 3200 <=a and a <=5000:
    print(b)