peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer

import sys
import collections

N=input().split()

list1=input().split()

list1=[int(i) for i in list1]

print(list1)

X=int(N[0])

Y=int(N[1])

#print(Y)

aaa=[]

print(len(set(list1)))

int1=len(set(list1))

if int1<=Y:
    print(0)
    sys.exit()

c = collections.Counter(list1)

print(min(c))

print(c)

#c.pop(min(c))

print(c)
# Judge status: Accepted
N = int(input())

print((N+1)//2/N)
# Judge status: Accepted
S = input()
T = input()
l = len(S)
Cnt=0
for i in range(l):
	if S[i]!=T[i]:Cnt+=1
      
print(Cnt)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
count = 0

while count < n:
  p = a.pop(0)
  ans = len(a) - a.count(p)
  print(ans)
  a.append(p)
  count += 1
# Judge status: Accepted
a = sum(list(map(int, input().split())))
if a > 21:
    print('bust')
else:
    print('win')
# Judge status: Accepted
N, K = map(int, input().split())
A = list(map(lambda x: int(x) - 1, input().split()))

R = []
done = set()
todo = [0]
done = set()
bp = None
while todo:
    p = todo.pop()
    R.append(p)
    done.add(p)
    np = A[p]
    if np in done:
        bp = np
    else:
        todo.append(np)
b = R.index(bp)
if K < b:
    ans = R[K] + 1
else:
    K -= b
    R = R[b:]
    ans = R[K%len(R)] + 1
print(ans)
# Judge status: Wrong Answer
import sys
a,b = map(int,input().split())
sum = 0
for i in range(1,1000):
  if a > sum:
    sum += i
  else:
    print(sum - a)
    sys.exit()
# Judge status: Wrong Answer
penki = [i for i in map(int, input().split())]
count = 3
if penki[0] == penki[1]:
    count -= 1
if penki[0] == penki[2]:
    count -= 1
if penki[1] == penki[2]:
    count -= 1
print(count)
# Judge status: Accepted
import math
n,x,t = list(map(int, input().split()))
print(math.ceil(n/x)*t)
# Judge status: Accepted
arr = []
arr2 = []
for i in range(int(input())):
    a = int(input())
    if a%10 == 0:
        arr2.append(a)
    else:
        arr.append(a)

arr.sort()
j = sum(arr)+sum(arr2)
if j%10 != 0:
    print(j)
else:
    k = 0
    while j%10 == 0 and k<len(arr):
        j -= arr[k]
        k += 1
    if j%10 == 0:
        print(0)
    else:
        print(j)
# Judge status: Wrong Answer
#ABC135 C

N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
S = 0
if A[0] > B[0]:
    S += B[0]
else:
    S += A[0]

if A[N] > B[N-1]:
    S += B[N-1]
else:
    S += A[N]

for i in range(1,N):
    if A[i] > B[i-1] + B[i]:
        S += B[i-1] + B[i]
    else:
        S += A[i]

print(S)
# Judge status: Wrong Answer
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.append(K + 1)
B.append(K + 1)
ia, ib = 0, 0
time = 0
flag = True
while flag:
    flag = False
    if A[ia] <= B[ib] and time + A[ia] <= K:
        time += A[ia]
        ia += 1
        flag = True
    if B[ib] < A[ia] and time + B[ib] <= K:
        time += B[ib]
        ib += 1
        flag = True
print(ia + ib)
# Judge status: Accepted
n,a,b=map(int,input().split())
ans=0
for i in range(1,n+1):
    c=list(str(i))
    d=0
    for g in c:
        d+=int(g)
    if a<=d and d<=b:
        ans+=i
print(ans)
# Judge status: Accepted
n,k = map(int, input().split(' '))
data = [int(x) for x in input().split(' ')]

for i in range(n-k):
    if data[i] < data[i+k]:
        print('Yes')
    else:
        print('No')
# Judge status: Wrong Answer
n = int(input())
res = [0] * n
for i in range(1, n):
  c, s, f = map(int, input().split())
  res[i-1] += s + c
  for j in range(i-1):
    if res[j] < s:
      res[j] = s + c
    elif res[j] == s:
      res[j] += c
    else:
      if (res[j] - s) % f == 0:
        res[j] += c
      else:
        res[j] += f + c
print(res)
# Judge status: Wrong Answer
A = input()
ans = 1

for i,j in enumerate(A):
    if i == 2:
        second = j
    if i == 3:
        if j != second:
            ans *= 0
    if i == 4:
        forth = j
    if j == 5:
        if j != forth:
            ans *= 0

if ans == 1:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
x,y = map(int,input().split())

print(x+int(y/2))
# Judge status: Accepted
a, b = map(int, input().split())
if a + b >= a + a - 1 and a + b >= b + b - 1:
    print(a+b)
elif a + a - 1 >= a + b and a + a - 1 >= b + b - 1:
    print(a + a - 1)
elif b + b - 1 > a + b and b + b - 1 >= a + a - 1:
    print(b + b - 1)
# Judge status: Accepted
from itertools import accumulate
import bisect
n=int(input())
l=list(accumulate(range(4473)))
while True:
    i=bisect.bisect_left(l,n)
    if i<1:break
    print(i)
    n-=i
# Judge status: Wrong Answer
N,M=map(int,input().split())
a=N*N/4+M*M/4
b=N+M
if int(b)>2:
  print(int(a))
else:
  print(0)
# Judge status: Wrong Answer
def main():
    a,b,c,d = map(int,input().split())
    
    ans = -1 * 10**10
    
    for i in (a,b):
        for j in (c,d):
            if i*j > ans:
                ans = i*j
    print(ans)
    
if __name__ == '__main__':
    main()
# Judge status: Accepted
x = int(input())

for i in range(-200,200):
    for j in range(-200,200):
        if i**5 - j**5 == x:
            print(i,j)
            exit()
# Judge status: Accepted
if __name__ == '__main__':
    x=list(map(int,input().split(" ")))
    y = list(map(int, input().split(" ")))
    num=0
    for i in y:
        num+=i
    if x[0]<num:
        print(-1)
    else: print(x[0]-num)
# Judge status: Accepted
N = 1000001
a = [0]* N
input()
for x in input().split():
  a[int(x)] += 1
for i in range(1, N):
  if a[i]:
    a[i + i::i] = (0 for _ in a[i + i::i])
print(a.count(1))
# Judge status: Wrong Answer
K = int(input())
A, B = map(int, input().split())

if A % K == 0 or B//K != A//K:
    print("OK")
else:
    print("NO")
# Judge status: Wrong Answer
n,m,k = map(int, input().split())
ln_a = list( map(int, input().split()))
ln_b = list( map(int, input().split()))
total = 10**9
output = 0
for i in range(1,len(ln_a) + len(ln_b) +1):
    for j in range(i +1):
        total = min(total, sum(ln_a[:j]) +  sum(ln_a[:i-j] ))
    if total <= k:
        output = i
    total = 10**9
print(output)
# Judge status: Accepted
import math
n,k = map(int,input().split())
a = list(map(int,input().split()))
print(math.ceil((n-1) / (k-1)))
# Judge status: Accepted
n, m = map(int, input().split())

if 2 * n > m:
    print(m // 2)
else:
    print(n + (m - 2 * n) // 4)
# Judge status: Accepted
s = int(input())
v = 10**9
x = (v-s%v)%v
y = (s+x)//v
print(0,0,v,1,x,y)
# Judge status: Accepted
N=int(input())
minz=10**11
minw=10**11
maxz=-10**11
maxw=-10**11
for i in range(N):
 
    a,b=map(int,input().split())
    if  a+b>maxz:
        maxz=a+b

    if a+b<minz:
        minz=a+b

    if  a-b>maxw:
        maxw=a-b

    if a-b<minw:
        minw=a-b

    
 
print(max((maxz-minz),(maxw-minw)))
# Judge status: Wrong Answer
def main():
    N, A, B = map(int, input().split())

    if abs(A-B) % 2 == 0:
        print(abs(A-B)//2)
    else:
        print(min([B-1, N-A]))


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
n,k=map(int,input().split())
l=list(map(int,input().split()))
lis=[]
if len(set(l))<=k:
  print(0)
else:
  li=list(set(l))
  for i in range(len(li)):
    lis.append(l.count(li[i]))
lis.sort()
sum=0
for i in range(len(lis)-k):
  sum+=lis[i]
print(sum)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int ,input().split()))
import math
def is_prime(n):
	if n == 1:
		return False
	
	for k in range(2, int(math.sqrt(n)) + 1):
		if n%k == 0:
			return False
	return True

cnt = 0
b = []
for i in range(n):
  if a[i] == 1:
    if i == 0:
      cnt += 1
      b.append(i+1)
      continue
    if is_prime(a[i]):
      cnt +=1
      b.append(i+1)
    else:
      print (-1)
      exit()
print (cnt)
if len(b) != 0:
  print (*b)
# Judge status: Accepted
d=25-int(input());print("Christmas"+" Eve"*d)
# Judge status: Wrong Answer
S = str(input("Word: ")).lower()
if S == "hi" * int(len(S) / 2) and 1 <= len(S) <= 10:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
a, b = map(int, input().split())

if a < 9 & b < 9:
    print(-1)
    exit()
print(a * b)
# Judge status: Wrong Answer
x,y = map(int,input().split())
ch = max(abs(x),abs(y)) - min(abs(x),abs(y))
if x <= 0 and y == 0 or x == y:
    print(ch)
elif x*y <= 0:
    print(ch+1)
elif x*y >= 0 and x >= y:
    print(ch+2)
else:
    print(ch)
# Judge status: Accepted
a, b = map(int, input().split())
cnt = 0
ans = 1
while ans < b:
    ans += (a-1)
    cnt += 1
print(cnt)
# Judge status: Accepted
S=input()
a,b,c=0,0,0
for i in S:
  if i=='a':
    a+=1
  elif i=='b':
    b+=1
  else:
    c+=1
d=max(a,b,c)-min(a,b,c)
if d==0 or d==1:
  print('YES')
else:
  print('NO')
# Judge status: Wrong Answer
N, M = [int(i) for i in input().split()]

if N == 1 and M == 1 :
    print(1)
elif N == 1 and M > 1 :
    print(M-2)
else :
    print((N-2) * (M-2))
# Judge status: Accepted
N,K = map(int,input().split())
x = list(map(int,input().split()))

ans = []
for i in range(N-K+1):
    if x[i] < 0 and x[i+K-1] > 0:
        ans += abs(x[i]) + abs(x[i+K-1]) + min(abs(x[i]),abs(x[i+K-1])),
    elif x[i] < 0:
        ans += -x[i],
    else:
        ans += x[i+K-1],
print(min(ans))
# Judge status: Accepted
s = input()
L = len(s)

ans = ""

for i in range(L):
    if s[i] == '1':
        ans += "1"
    elif s[i] == '0':
        ans += "0"
    else:
        if ans == "":
            pass
        else:
            ans = ans[:-1]

print(ans)
# Judge status: Accepted
import pprint
N = int(input())
S = {}
for i in range(N):
    tmp = input()
    if tmp in S.keys():
        S[tmp] = S[tmp] + 1
    else:
        S[tmp] = 1
    #pprint.pprint(S)

num = 0
v = []
for key,value in S.items():
    if value > num:
        num = value
        v = [key]
    elif value == num:
        v.append(key)

v.sort()

for i in v:
    print(i)
# Judge status: Accepted
w,h,n=map(int,input().split())

up=h
down=0
left=0
right=w


for i in range(n):
    x,y,a=map(int,input().split())
    if a==1:
        left=max(left,x)
    if a==2:
        right=min(right,x)
    if a==3:
        down=max(down,y)
    if a==4:
        up=min(up,y)

   
if right>left and up>down:
    print((right-left)*(up-down))
else:
    print(0)
# Judge status: Wrong Answer
import collections
w=input()
words=[a for a in w]
c=collections.Counter(words)
values,counts=zip(*c.most_common())
for n in counts:
    if n%2==1:
        print('No')
        break
    else:
        print('Yes')
    break
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
"""
Created on Mon Jun  1 13:59:38 2020

@author: NEC-PCuser
"""

N = int(input())
A = list(map(int, input().split()))
minusCount = 0
ans = 0
miniumAbs = 10 * 9
for i in range(0, len(A)):
    if (A[i] < 0):
        minusCount += 1
    if (miniumAbs > abs(A[i])):
        miniumAbs = abs(A[i])
    ans += abs(A[i])
if minusCount %2 == 0:
    print(ans)
else:
    print(ans - 2 * miniumAbs)
# Judge status: Accepted

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

score = {'r': P, 's': R, 'p': S}

ans = 0
for r in range(K):
    i = r
    p = '' #一個前の文字
    while i<N:
        if T[i] == p:
            p = ''
        else:
            ans += score[T[i]]
            p = T[i]
        i += K

print(ans)
# Judge status: Accepted
r = int(input())
print(2 * 3.14159 * r)
# Judge status: Wrong Answer
from collections import Counter
n = int(input())
a = list(map(int, input().split()))

for _ in Counter(a).values():
  print(_)
# Judge status: Wrong Answer
n,k = map(int, input().split())
p = list(map(int, input().split()))
m = max(p)
h = [0]*(m+1)
h[1] = 1
for i in range(1,m):
    h[i+1] = h[i]+0.5
ans = sum = 0
for i in range(n):
    if i>=k:
        sum = sum-h[p[i-k]]+h[p[i]]
        if ans<sum: ans=sum
    else:
        sum += h[p[i]]
        if i==k: ans=sum
print(ans)
# Judge status: Accepted
n, h, *A = map(int, open(0).read().split())
a = max(A[::2])
b = sorted(A[1::2])[::-1]
for i in range(n):
    if h <= 0:
        n = i
        h = 0
        break
    if b[i] < a:
        n = i
        break
    h -= b[i]
print(n - (-h // a))
# Judge status: Accepted
s = str(input())
if s == "ARC":
    print("ABC")
else:
    print("ARC")
# Judge status: Wrong Answer
N = int(input())
S = input()

a = S.count("E")
ans = [a]
for i in range(1,N):
  if S[i]=="E" and S[i-1]=="E":
    a -= 1
  elif S[i]=="E" and S[i-1]=="W":
    a += 0
  elif S[i]=="W" and S[i-1]=="E":
    a += 0
  elif S[i]=="W" and S[i-1]=="W":
    a += 1
  ans.append(a)

print(min(ans))
# Judge status: Wrong Answer
N,M = map(int,input().split())

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

border = sum(A) / (4 * M)

B=[i for i in A if i > border]

if len(B) >= M:
  print("Yes")
  exit()
print("No")
# Judge status: Wrong Answer
N, M = map(int, input().split())
AC = []
ans = []
for i in range(M):
    p, S = list(input().split())
    if S == "AC" and p not in AC:
        AC.append(p)
    elif p not in AC:
        ans.append(p)
print(len(AC), len(ans))
# Judge status: Accepted
def main():
    x = int(input())
    ans = 0
    d = 0
    if x == 1:
        return 1
    for i in range(2, x):
        d = i
        p = 2
        while d ** p <= x:
            ans = max(ans, d ** p)
            p += 1
    return ans


if __name__ == '__main__':
    print(main())
# Judge status: Accepted
a = list(input())
A_flag = False
B_flag = False

for n in range(3) :
    if a[n] == "A":
        A_flag = True
    elif a[n] == "B":
        B_flag = True
if A_flag and B_flag:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N = int(input())


def two(n):
    ans = 0
    while n % 2 == 0:
        n //= 2
        ans += 1
    return ans


print(max([two(i + 1) for i in range(N)]))
# Judge status: Accepted
N = int(input())
S = str(input())

ans = ''
for i in S:
  chatonum = lambda i: ord(i) - ord('A') + 1
  num = chatonum(i)
  num += N
  if 26 < num:
    num -= 26
  numtocha = lambda num: chr(num+64)
  cha = numtocha(num)
  ans += cha
  
print(ans)
# Judge status: Accepted
n, a, b = map(int, input().split())
MOD = 10**9+7

len_inv = 2*(10**5) + 10
inv = [1]*(len_inv)

for i in range(2, len_inv):
    inv[i] = inv[MOD%i] * (MOD - MOD//i) % MOD

def comb(n, k, MOD):
    x = 1
    for i in range(k):
        x *= (n-i)
        x *= inv[i+1]
        x %= MOD
    return x

ans = pow(2, n, MOD) - 1 - comb(n, a, MOD) - comb(n, b, MOD)
ans += MOD
ans %= MOD
print(ans)
# Judge status: Accepted
a,b,c,x,y = map(int, input().split())

A = a * x + b * y
if min(x,y) == x:
    B = c * x * 2 + (y-x) * b
    C = c * y * 2
else:
    B = c * y * 2 + (x-y) * a
    C = c * x * 2

print(min(A,B,C))
# Judge status: Accepted
N = int(input())
a_list = list(map(int, input().split()))
count = 0
for i in range(N):
  if i%2==0 and a_list[i]%2==1:
    count = count + 1
print(count)
# Judge status: Accepted
a,b = map(int,input().split())
print(str(a) * b) if a<b else print(str(b) * a)
# Judge status: Accepted
N = int(input())
X = 800 * N
Y = 200 * (N // 15)
print(X - Y)
# Judge status: Wrong Answer
N = int(input())
for i in range(2, N):
  if N % i == 0:
    print((N//i)+i-2)
    exit(0)
# Judge status: Accepted
a,b = map(int, input().split())

c = a*(10**len(str(b)))+b
n = 0
for i in range(1, c//2+1):
    if (i**2)==c:
        print('Yes')
        n += 1
        break
if n == 0:
    print('No')
# Judge status: Accepted
a, b, c = map(int, input().split())
if a <= c <= b:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
N = int(input())
abc = [list(map(int, input().split())) for _ in range(N)]

dp = [[0, 0, 0]] * N
dp[0] = abc[0]

for i in range(1, N):
    tmp1 = max(dp[i-1][1]+abc[i][0], dp[i-1][2]+abc[i][0])
    tmp2 = max(dp[i-1][0]+abc[i][1], dp[i-1][2]+abc[i][1])
    tmp3 = max(dp[i-1][0]+abc[i][2], dp[i-1][1]+abc[i][2])
    dp[i] = [tmp1, tmp2, tmp3]
print(max(dp[N-1]))
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))

if 0 in A:
    print(0)
else:
    prod = 1
    for i in A:
        prod = prod * i
        if prod > 10 ** 18:
            print(-1)
            exit()
    print(prod)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline

n = int(input())
b = list(map(int, input().split()))
ans = b[-1]
memo = b[-1]
for i in range(1, n):
    if memo >= b[n - 2 - i]:
        memo = b[n - 2 - i]
    ans += memo
print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
s=input()
a=sum([s[i+1]==s[i] for i in range(n-1)])
print(min(a+2*k,n-1))
# Judge status: Accepted
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

MX = 10**18
n=ni()
a = sorted(nl())



num = 1
for i in range(n):
  num*=a[i]
  if num > MX:
    print(-1)
    exit()
print(num)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))



count = 0
for i in range(N):
    if A[i] <= B[i]:
        count += (B[i] - A[i]) // 2
        continue
    else:
        count -= A[i] - B[i]


if count >= 0:
    print ('Yes')
else:
    print ('No')
# Judge status: Accepted
N=int(input())

sum=0
for j in range(1,N+1):
    Y=int(N/j)
    sum+=int((Y*(Y+1)*j)/2)

print(sum)
# Judge status: Accepted
n = int(input())
if n%2 == 0:
    print(int(n/2))
else:
    print(int(n/2)+1)
# Judge status: Accepted
n, k = map(int, input().split())

ans = 0
for i in range(1, n+1):
  p = 1 / n
  if i >= k:
    ans += p
    continue
  while i < k:
    i *= 2
    p /= 2
  ans += p
  
print(ans)
# Judge status: Accepted
from collections import defaultdict
s = input()
t = input()
sd = defaultdict(set)
td = defaultdict(set)
for i in range(len(s)):
    sd[s[i]].add(t[i])
    td[t[i]].add(s[i])
if [1 for i in sd.values() if len(i)!=1] or [1 for i in td.values() if len(i)!=1]:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

count=0
for i in range(n-2):
    for j in range(i+1,n-1):
        for k in range(j+1,n):
            if a[i]+a[j]>a[k] and a[j]+a[k]>a[i] and a[i]+a[k]>a[j]:
                if a[i]!=a[j] and a[i]!=a[k] and a[j]!=a[k]:
                    count+=1

print(count)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())
d = 0
d += a**.5
d += b**.5
d -= c**.5
print("Yes" if d < 0 else "No")
# Judge status: Wrong Answer
#094_D
n = int(input())
a = sorted(list(map(int, input().split())))
m = a[-1]
mid = m // 2
l, r = 0, n - 1
while r - l > 1:
    x = (l + r) // 2
    if a[x] <= mid:
        l = x
    else:
        r = x
print(m, a[r])
# Judge status: Wrong Answer
num=input()
s=[int(i) for i in input().split()]
s.sort(reverse=True)
point=0
for (i,j) in enumerate(s):
    if i+1==len(s):
        break
    point+=j
print(point)
# Judge status: Accepted
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A,B = map(int,input().split())

print(A if A<=B else A-1)
# Judge status: Wrong Answer
s = int(input())
count = 1
while s!=4:
    if s % 2 == 0:
        s = s//2
        count += 1
    else:
        s = 3 * s + 1
        count += 1
print(count+3)
# Judge status: Accepted
N = int(input())
Count = 0
for n in range(1, N+1):
  Count+=n

print(Count)
# Judge status: Accepted
def main():
    i = int(input())
    if i == 0:
        print(0)
        exit()

    ans = ""
    while i:
        p, q = divmod(i, 2)
        if q:
            ans = "1" + ans
        else:
            ans = "0" + ans
        i = -p

    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N,M = map(int,input().split())
X = sorted(list(map(int,input().split())))
B=[]

#print(X)
for i in range(M-1):
    B.append(abs(abs(X[i+1])-abs(X[i])))

B.sort()
#print(B)


print(sum(B[:M-N]))
# Judge status: Wrong Answer
n,k=map(int,input().split())
a=list(map(int,input().split()))
if n%(k-1)==0:
  print(n//(k-1))
else:
  print(n//(k-1)+1)
# Judge status: Accepted
from math import fabs
x,y = map(int, input().split())
if y >= x >= 0: 
    print(int(fabs(y-x)))
elif 0 >= y >= x:
    print(int(fabs(y-x))) 
elif x > y > 0: 
    print(int(x - y + 2))
elif 0 > x > y:
    print(int(x - y + 2)) 
else:
    print(int(fabs(fabs(x)-fabs(y)) + 1))
# Judge status: Accepted
a,b,c = map(int,input().split())

if a <=c and b >= c:
  	print("Yes")
else:
  	print("No")
# Judge status: Accepted
D, T, S = map(int,input().split())
if(D/S>T):
    print('No')
else:
    print('Yes')
# Judge status: Wrong Answer
sx,sy,tx,ty = map(int, input().split())
dx = abs(tx-sx)
dy = abs(ty-sy)
ans = "U"*dy + "R"*dy +"D"*dy + "L"*dx
ans += "L" + "U"*(dy+1) + "R"*(dx+1) + "D"
ans += "R" + "D"*(dy+1) + "L"*(dx+1) + "U"
print(ans)
# Judge status: Accepted
a,b,c = list(map(int,input().split()))
if a + b == c:
  print("Yes")
elif a + c == b:
  print("Yes")
elif b + c ==a:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
N = int(input())
ans =0
for i in range(1,N):
    flag = N%i
    y = N//i
    if flag == 0:
        ans += y-1
    else:
        ans += y
    # print(y,flag)
print(ans)
# Judge status: Accepted
from collections import deque

S = input()

q = deque(S)
forward = True
for _ in range(int(input())):
    TFC = input().split()
    if TFC[0] == '1':
        forward = not forward
    else:
        if (TFC[1] == '1') == forward:
            q.appendleft(TFC[2])
        else:
            q.append(TFC[2])

if not forward:
    q.reverse()

print(''.join(q))
# Judge status: Wrong Answer
s = list(input())
t = list(input())
s.sort()
t.sort()
if s < t:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import math

def f(theta):
    theta = math.radians(theta)
    if x > a * b / 2:
        return a * b - a * a * math.tan(theta) / 2
    else:
        return b * b / (2 * math.tan(theta))
        
a, b, x = map(int, input().split())
x /= a

left = 0
right = 90
for i in range(40):
    theta = (left + right) / 2
    
    if f(theta) > x:
        left = theta
    else:
        right = theta
print(theta)
# Judge status: Accepted
A = int(input())
B = int(input())
C = int(input())
X = int(input())

res = 0
for i in range(A+1):
  for j in range(B+1):
    for k in range(C+1):
      if 500*i+100*j+50*k == X:
        res+=1

print(res)
# Judge status: Wrong Answer
n = int(input())
# 配列入力の受け取り
arrA = list(map(int,input().split()))
arrB = list(map(int,input().split()))

mons = arrA[n]
res = 0
for i in range(n-1,-1,-1):
    mons += arrA[i]
    if mons>=arrB[i]:
        res += arrB[i]
        mons -= arrB[i]
    else:
        res += mons
        mons -= mons

print(res)
# Judge status: Accepted
K = int(input())
S = input()

aa = []

if len(S) <= K:
  print(S)
else:
  for x in range(K):
    aa.append(S[x])
  print("".join(aa) + "...", sep = "")
# Judge status: Wrong Answer
a,b,c,d=map(int,input())
x=int(a+b)
y=int(c+d)
if 0<=x<=12 and 0<=b<=12:
  if x==y==0:
    print('NA')
  else:
    print('AMBIGUOUS')
elif 0<=x<=99 and 1<=y<=12:
  print('YYMM')
elif 1<=x<=12 and 0<=y<=99:
  print('MMYY')
else:
  print('NA')
# Judge status: Accepted
# 3 つの整数 A , B , C が与えられます。
# 整数 C が A 以上 かつ B 以下であるかを判定してください。

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

if C >= A and C <= B:
    print('Yes')

else:
    print('No')
# Judge status: Accepted
n,k = map(int,input().split())
x = list(map(int,input().split()))
m = 1000000000000000
for i in range(n-k+1):
    m = min(m,abs(x[i]) + x[i+k-1]-x[i], abs(x[i+k-1]) + x[i+k-1]-x[i])
print(m)
# Judge status: Accepted
A, B = map(int, input().split())
num = 0
for i in range(B + 1):
    num += A
    if  num % B == 0:
        break
print(num)
# Judge status: Accepted
n, m = map(int,input().split())

if m <= 4*n and m >= 2*n and m%2 == 0 and n <= 50 and n < m:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
d, n = map(int, input().split())

div = 100 ** d

print(div * n)
# Judge status: Accepted
A, B = map(float, input().split())
A = int(A)
B = int(B * 100 + 0.5)
print(A * B // 100)