Harryxun/stf_run huggingface dataset:
text1 = raw_input()
text2 = raw_input()

if text1 == text2[::-1]:
    print("OK")
else:
    print("NO")

### FIXED CODE ###

text1 = input()
text2 = input()

if text1 == text2[::-1]:
    print("YES")
else:
    print("NO")
while True:
    m=input().split()
    h=int(m[0])
    w=int(m[1])
    if (a==0)&(b==0):
      break
    for i in range(a):
       print("#"*b)
    print()
    


### FIXED CODE ###

while True:
    v=input().split()
    a=int(v[0])
    b=int(v[1])
    if a==0 and b==0:
       break
    for i in range (a):
        print('#'*b)
    print()
# -*- coding: utf-8 -*-

import sys


lineNumber = 0
#for line in [ "2", "1000", "800", "999999999999999999999999999", "1" ]:
for line in sys.stdin.readlines():
    lineNumber += 1

    # line exception
    if lineNumber == 1:
        continue
    
    # get data
    List = map(int, line.strip().split())

    # set data
    if lineNumber % 2 == 0: a = List[0]
    else                  : b = List[0]

    # sum
    if lineNumber % 2 == 1:
        c = a + b
        if c < 10**79: print str(c)
        else         : print "overflow"

### FIXED CODE ###

for i in range(int(raw_input())):
    x = int(raw_input())
    y = int(raw_input())
    s = str(x+y)
    if len(s) > 80:
        print "overflow"
    else :
        print s
# print('input >>')
N = input()
last = int(N[-1])

# print('-----output-----')
if last == 2 or last == 4 or last == 5 or last == 7 or last == 9:
    print('hon')
elif last == 0 or last == 1 or last == 6 or last == 8:
    print('pon')
elif last == 3
    print('bon')

### FIXED CODE ###

# print('input >>')
N = input()
last = int(N[-1])

# print('-----output-----')
if last == 2 or last == 4 or last == 5 or last == 7 or last == 9:
    print('hon')
elif last == 0 or last == 1 or last == 6 or last == 8:
    print('pon')
elif last == 3:
    print('bon')
import fractions
N=int(input())
a = list(map(int, input().split()))

#------------最小公倍数---------------------
lcm = 1
for i in range(1, N):
    lmc = lcm * a[i] // fractions.lcm(lcm, a[i])
#------------------------------------------
b= []
for i in range(N):
    b.append(lcm //a[i])
ans=0

for j in b:
    ans +=(lcm// b[j])%1000000007


print(ans)

### FIXED CODE ###

import fractions
N=int(input())
a = list(map(int, input().split()))

#------------最小公倍数---------------------
lcm = a[0]
for i in range(1, N):
    lcm = lcm * a[i] // fractions.gcd(lcm, a[i])
#------------------------------------------
ans=0
for j in a:
    ans += lcm // j
print(ans % 1000000007)
N = int(input())
inp2 = input()
a = inp2.split()
count = 0
for i in range(int(N)):
	b = int(a[i])
	flag = True
	while flag:
		c = b/2
		if c.isinstance(c,int):
			count+=1
		else:
			flag = False

print(count) 

### FIXED CODE ###

N = int(input())
inp2 = input()
a = inp2.split()
count = 0
for i in range(int(N)):
	b = int(a[i])
	flag = True
	c = b
	while flag:
		c = c/2
		if c.is_integer():
			count+=1
		else:
			flag = False

print(count)
a,b = map(int,int().input())
print(a * b)

### FIXED CODE ###

#169A
#A*Bを整数として出力せよ
#1.入力をプログラムで扱えるように受け取ること
a,b = map(int, input().split())
#print(a,b)
#2.受け取った入力値を使って適切に処理（計算）すること
answer = a * b

#3.計算した結果を出力すること
print(answer)
N, i = map(int, input().split())

print(N + 1 - i)
hibiki@hibiki-MB-E410

### FIXED CODE ###

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

print(N + 1 - i)
print()
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n,m = li()

graph = [[] for _ in range(n)]
for _ in range(m):
    l,r,d = li()
    l -= 1
    r -= 1
    graph[l].append((d,r))
    graph[r].append((-d,l))
    
searched = [False]*n
dist = [float("inf") for _ in range(n)]

exist = True
for i in range(n):
    if not searched[i]:
        dist[i] = 0
        searched[i] = True
        stack = [(0,i)]
        
        while stack:
            cost, cur = stack.pop()
            for nex_cost, nex_node in graph[cur]:
                if searched[nex_node]:
                    if cost + nex_cost != dist[nex_node]:
                        exist = False
                        
                else:
                    stack.append((cost+nex_cost, nex_node))
                    dist[nex_node] = cost + nex_cost
                    searched[nex_node] = True
                    
print("Yes") if exist else print("No")

### FIXED CODE ###

S = input()
N = len(S)

ans = N//2 + bool(N%2)


# 奇数
if N%2 == 1:
    left = S[:N//2]
    left = left[::-1]
    right = S[N//2+1:]
    cent = S[N//2]
    
    i = 0
    while i < N//2:
        if left[i] == cent and right[i] == cent:
            ans += 1
            i += 1
        else:
            break
        
else:
    left = S[:N//2]
    left = left[::-1]
    right = S[N//2:]
    cent = S[N//2]
    
    i = 0
    while i < N//2:
        if left[i] == cent and right[i] == cent:
            ans += 1
            i += 1
        else:
            break
        
print(ans)
n = int(input())

def isTriangular(n):
    i = 1
    while( (i*(i+1))//2 <= n) :
        if (i*(i+1))//2 == n:
            return True
        i+=1
    return False


def solve(n):
    if not isTriangular(n):
        print("No")
        return
    i = 1
    jump = 2
    ans = [[1],[1]]
    while ans[-1][-1] != n:
        next_ind = range(ans[-1][-1]+1, ans[-1][-1]+jump+1)
        for i in range(len(next_ind)):
            ans[i].append(next_ind[i])
        ans.append(next_ind)
        i+=jump
        jump += 1
    print("Yes")
    print(len(ans))
    for x in ans:
        p_str = ""
        p_str += str(len(x))
        for b in x:
            p_str += " " 
            p_str += str(b)
        print(p_str)

        

        

solve(n)

    


### FIXED CODE ###

n = int(input())

def isTriangular(n):
    i = 1
    while( (i*(i+1))//2 <= n) :
        if (i*(i+1))//2 == n:
            return True
        i+=1
    return False


def solve(n):
    if not isTriangular(n):
        print("No")
        return
    i = 1
    jump = 2
    ans = [[1],[1]]
    while ans[-1][-1] != n:
        next_ind = list(range(ans[-1][-1]+1, ans[-1][-1]+jump+1))
        for i in range(len(next_ind)):
            ans[i].append(next_ind[i])
        ans.append(next_ind)
        i+=jump
        jump += 1
    print("Yes")
    print(len(ans))
    for x in ans:
        p_str = ""
        p_str += str(len(x))
        for b in x:
            p_str += " " 
            p_str += str(b)
        print(p_str)
solve(n)
#encoding:utf-8

import numpy as np
import sys
sys.setrecursionlimit(1000000)

H, W = map(int, input().split())
S = []
for i in range(H):
    s = list(input())
    S.append(s)



def count_answer(x,y,num_b,num_w):
    # print(used)

    if S[x][y] == "#":
        num_b += 1
    else:
        num_w += 1
    used[x][y] = 1
    dx = [0,0,1,-1]
    dy = [1,-1,0,0]
    # print("x,y:",x,y)
    for i in range(4):
        next_x = x + dx[i]
        next_y = y + dy[i]
        # print(next_x,next_y)
        if next_x == -1 or next_y == -1 or next_x >= H or next_y >= W:
            pass
        elif used[next_x,next_y] == 1:
            pass
        elif S[next_x][next_y] != S[x][y]:
            num_b,num_w = count_answer(next_x,next_y,num_b,num_w)
    return num_b,num_w

answer = 0
used = np.zeros((H,W))
for i in range(H):
    for j in range(W):
        if used[i][j] == 1:
            continue
        num_b = 0
        num_w = 0
        if S[i,j] == "#":
            num_b,num_w  = count_answer(i,j,num_b,num_w)
            answer += num_b*num_w
print(answer)


### FIXED CODE ###

#encoding:utf-8

import numpy as np
import sys
sys.setrecursionlimit(1000000)

H, W = map(int, input().split())
S = []
for i in range(H):
    s = list(input())
    S.append(s)


def count_answer(x,y,num_b,num_w):
    # print(used)

    if S[x][y] == "#":
        num_b += 1
    else:
        num_w += 1
    used[x][y] = 1
    dx = [0,0,1,-1]
    dy = [1,-1,0,0]
    # print("x,y:",x,y)
    for i in range(4):
        next_x = x + dx[i]
        next_y = y + dy[i]
        # print(next_x,next_y)
        if next_x == -1 or next_y == -1 or next_x >= H or next_y >= W:
            pass
        elif used[next_x,next_y] == 1:
            pass
        elif S[next_x][next_y] != S[x][y]:
            num_b,num_w = count_answer(next_x,next_y,num_b,num_w)
    return num_b,num_w

answer = 0
used = np.zeros((H,W))
for i in range(H):
    for j in range(W):
        if used[i][j] == 1:
            continue
        num_b = 0
        num_w = 0
        if S[i][j] == "#":
            num_b,num_w  = count_answer(i,j,num_b,num_w)
            answer += num_b*num_w
print(answer)
s = str(N)

if s[0] == '7' or s[1] == '7' or s[2] == '7':
  print('Yes')
else:
  print('No')


### FIXED CODE ###

N = input()
s = str(N)

if s[0] == '7' or s[1] == '7' or s[2] == '7':
  print('Yes')
else:
  print('No')
from math import gcd

def solv():
    n = int(input())
    ans = 0
    for i in range(1, n + 1):
        for j in range(1, n + 1):
            a = gcd(i, j)
            for k in range(1, n + 1):
                ans += gcd(a, k)
    print(ans)

solve()

### FIXED CODE ###

import sys
import numpy as np

from math import gcd

N = int(sys.stdin.readline())
ans = 0
"""
dp = np.zeros((N+1, N+1))
def gcd(a, b):
    if a < b:
        a, b = b, a
    
    if dp[a][b] != 0:
        return dp[a][b]

    while b>0:
        a, b = b, a % b
    
    dp[a][b] = a
    return a
"""
for i in range(1,N+1):
    for j in range(1,N+1):
        temp = gcd(i, j)
        for k in range(1,N+1):
            ans += gcd(temp, k)
            
print(ans)
def solve(string):
    n, m, *a = map(int, string.split())
    needs = {i + 1: n for i, n in enumerate(map(int, "2 5 5 4 5 6 3 7 6".split()))}
    if 2 in a and 5 in a:
        a.remove(2)
    if 3 in a and 5 in a:
        a.remove(3)
    if 2 in a and 3 in a:
        a.remove(2)
    b = sorted(a, key=lambda x: needs[x])
    index = 0
    base = str(b[0]) * (n // needs[b[0]])
    n %= needs[b[0]]
    while n > 0:
        use = [_b for _b in b if needs[_b] <= needs[b[0]] + n]
        if max(use) == b[0]:
            tmp_n = use[-1]
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:-tmp_c] + (str(tmp_n) * tmp_c)
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
        else:
            tmp_n = use[-1]
            tmp_n = max(use)
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:index] + str(tmp_n) * tmp_c + base[index + tmp_c:]
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
            index += tmp_c
    return base


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))


### FIXED CODE ###

def solve(string):
    n, m, *a = map(int, string.split())
    needs = {i + 1: n for i, n in enumerate(map(int, "2 5 5 4 5 6 3 7 6".split()))}
    if 2 in a and 5 in a:
        a.remove(2)
    if 3 in a and 5 in a:
        a.remove(3)
    if 2 in a and 3 in a:
        a.remove(2)
    if 6 in a and 9 in a:
        a.remove(6)
    b = sorted(a, key=lambda x: needs[x])
    index = 0
    base = str(b[0]) * (n // needs[b[0]])
    n %= needs[b[0]]
    while n > 0:
        use = [_b for _b in b if needs[_b] <= needs[b[0]] + n]
        if len(use) == 1:
            base = base[:-1]
            n += needs[b[0]]
        elif max(use) == b[0]:
            tmp_n = use[-1]
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:-tmp_c] + str(tmp_n) * tmp_c
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
        else:
            tmp_n = max(use)
            tmp_c = n // (needs[tmp_n] - needs[b[0]])
            base = base[:index] + str(tmp_n) * tmp_c + base[index + tmp_c:]
            n -= (needs[tmp_n] - needs[b[0]]) * tmp_c
            index += tmp_c
    return base


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))
def fun(A,B):
  if A >= 13 :
    return B
  else if A > 5 :
    return B / 2
  else:
    return 0

### FIXED CODE ###

A,B = map(int, input().split())
 
if A < 6:
  B = 0
elif (6 <= A) and (A < 13):
  B /= 2
else :
  pass
  
print(int(B))
# 入力の取得(空白を除く)
    s = list(input().split())

    # 処理
    isPoor = False
    if s[0] == s[1] and s[1] != s[2]:
        isPoor = True
    if s[1] == s[2] and s[2] != s[0]:
        isPoor = True
    if s[2] == s[0] and s[0] != s[1]:
        isPoor = True

    if isPoor:
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

# 入力の取得(空白を除く)
s = list(input().split())

# 処理
isPoor = False
if s[0] == s[1] and s[1] != s[2]:
  isPoor = True
if s[1] == s[2] and s[2] != s[0]:
    isPoor = True
if s[2] == s[0] and s[0] != s[1]:
	isPoor = True

if isPoor:
	print("Yes")
else:
	print("No")
import sys
N, M = map(int, input().split())
A = [int(input()) for i in range(M)]
d = [0]*N
d[0] = 1
d[1] = 1
def func(N):
    if d[N] > 0:
        return d[N]
    d[N] = func(N-1) + func(N-2)
    return d[N]
if M == 0:
    print(func(N)%1000000007)
    sys.exit()

for i in range(M-1):
    if A[i+1] == A[i]+1:
        print(0)
        sys.exit()
        

A = [-1] + A + [N+1]

B = [A[i+1]-A[i]-2 for i in range(M+1)]
ans = 1
for i in range(M+1):
    ans = ans * func(B[i])
ans = ans%1000000007
print(ans)

### FIXED CODE ###

import sys
 
n,m=map(int,input().split())
a=[int(input()) for i in range(m)]+[0] #jがはみ出ないように最後に付け足しておく
MOD=7+10**9 #%MODを忘れない
 
dp=[1]+[0]*n
 
j=0
#iにのぼることができるかを考える
for i in range(1,n+1):
  if i==a[j]:
    j+=1
  elif i>1:
    dp[i] = (dp[i-1] + dp[i-2])%MOD #-1,-2からの遷移を考える
  else:
    if i!=a[0]:
      dp[i] = dp[i-1]

print((dp[-1])%MOD)
a, b =  map(int,input().split())
c = A + B
if c < A - B:
  c = A - B
if c < A * B:
  c = A * B:
print(c)

### FIXED CODE ###

a, b =  map(int,input().split())
c = a + b
if c < a - b:
	c = a - b
if c < a * b:
	c = a * b
print(c)
x = int(input())
y = int(input())
if x > 9:
    print(-1)

elif y > 9:
    print(-1)

else:
    print(x*y)


### FIXED CODE ###

x,y =map(int,input().split())

if x > 9:
    print(-1)

elif y > 9:
    print(-1)

else:
    print(x*y)
n = input()
a = list(map(int,input().split()))

for i in range(n):
  if not a[i] %= 2 and (a[i] %= 3 or a[i] %= 5):
    print("DNIDED")
    exite()
else:
  print("APPROVED")

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
c = 0
for i in range(N):
    if A[i] % 2 == 0:
        if A[i] %3 != 0 :
            if A[i] %5 != 0:
                c = 1
                break
if c == 0:
    print("APPROVED")
else:
    print("DENIED")
import math
 
N = int(input())
d_list = []
 
for i in range(3, int(math.sqrt(N))):
  if N % i == 0:
    d_list.append(i)
    if i != math.sqrt(N):
      d_lsit.append(N / i)
 
output = sum(d_list) - (len(d_list) - 2) - 3
print(output)

### FIXED CODE ###

import math
 
N = int(input())
d_list = []
 
for i in range(1, int(math.sqrt(N)) + 1):
  if N % i == 0:
    if i != 1:
      if (N // (i - 1)) == (N % (i - 1)):
        d_list.append(i)
    if i != math.sqrt(N):
      if (N // (N / i - 1)) == (N % (N / i - 1)):
        d_list.append(N / i)
 
output = sum(d_list) - len(d_list)
print(int(output))
from collections import defaultdict

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

d = defaultdict(int)
ans = 0
pena = 0

for _ in range(m):
    p, s = input().split()
    if s == "AC":
        if d[p] == -1:
            continue
        else:
            ans += 1
            pena += d[p]
            d[p] = -1
    else:
        if d[p] == -1:
            continue
        else;
            d[p] += 1

print(ans, pena)

### FIXED CODE ###

from collections import defaultdict

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

d = defaultdict(int)
ans = 0
pena = 0

for _ in range(m):
    p, s = input().split()
    if s == "AC":
        if d[p] == -1:
            continue
        else:
            ans += 1
            pena += d[p]
            d[p] = -1
    else:
        if d[p] == -1:
            continue
        else:
            d[p] += 1

print(ans, pena)
N = int(input())
A = [0] * N
for i in range(N):
    A[i] = int(input())

A_even = A[::2]
A_odd = A[1::2]
A_even = sorted(A_even)
A_odd = sorted(A_odd)
A_sorted = [0] * N
for i in range(N):
    if i % 2 == 0:
        A_sorted[i] = A_even[i // 2]
    else:
        A_sorted[i] = A_odd[i // 2]


class Bit:
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)

    def sum(self, idx):
        s = 0
        while idx > 0:
            s += self.tree[idx]
            idx -= idx & -idx
        return s

    def add(self, idx, x):
        while idx <= self.size:
            self.tree[idx] += x
            idx += idx & -idx


bit = Bit(max(A))
ans = 0
for i in range(N):
    bit.add(A_sorted[i], 1)
    ans += i + 1 - bit.sum(A_sorted[i])

print(ans)


### FIXED CODE ###

N = int(input())
A_raw = [0] * N
for i in range(N):
    A_raw[i] = (int(input()), i)
A_raw.sort(key=lambda x: x[0])
A = [0] * N
for i in range(N):
    A[A_raw[i][1]] = i

ans = 0
for i in range(N):
    if i % 2 == 0:
        if A[i] % 2 == 1:
            ans += 1

print(ans)
"""
Writer: SPD_9X2
https://atcoder.jp/contests/agc014/tasks/agc014_d

白にしか隣接しない白を作れれば勝ちである
黒は、直前に置かれた白に対して対策するような動きをする羽目になる

距離2の葉の対があったら100%可能

ある時点での残りの森を考える(残りのどの点も黒が隣接していないとする)
葉に白を置く→葉において阻止
葉に隣接する点にしろを置く→葉において阻止
それ以外の点は、置いたら横に置くだけ(葉ではないので、隣接頂点が存在する)

なので、十分性もおｋ？
距離2の葉が存在するかだけを判定すればよさそう

"""

N = int(input())

lis = [ [] for i in range(N) ]

for i in range(N-1):

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

    a -= 1
    b -= 1
    lis[a].append(b)
    lis[b].append(a)

import sys
sys.setrecursionlimit(500000)

if N == 2:
    print ("Second")
    sys.exit

def dfs(v,p):

    if len(lis[v]) == 1:
        return 1

    pl = 0
    for nex in lis[v]:
        if nex != p:
            pl += dfs(nex,v)

    if pl >= 2:
        print ("First")
        sys.exit()

    return 0


fi = None
for i in range(N):
    if len(lis[i]) > 1:
        fi = i
        break

dfs(fi,fi)
print ("Second")


### FIXED CODE ###


"""
Writer: SPD_9X2
https://atcoder.jp/contests/agc014/tasks/agc014_d

白にしか隣接しない白を作れれば勝ちである
黒は、直前に置かれた白に対して対策するような動きをする羽目になる

距離2の葉の対があったら100%可能

ある時点での残りの森を考える(残りのどの点も黒が隣接していないとする)
葉に白を置く→葉において阻止
葉に隣接する点にしろを置く→葉において阻止
それ以外の点は、置いたら横に置くだけ(葉ではないので、隣接頂点が存在する)

なので、十分性もおｋ？
距離2の葉が存在するかだけを判定すればよさそう

そうでないとき、
奇数個の頂点の部分木が2つ以上存在したらおｋ？
検証してみるか

"""

N = int(input())

lis = [ [] for i in range(N) ]

for i in range(N-1):

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

    a -= 1
    b -= 1
    lis[a].append(b)
    lis[b].append(a)

import sys
sys.setrecursionlimit(500000)

if N == 2:
    print ("Second")
    sys.exit()

def dfs(v,p):

    if len(lis[v]) == 1:
        return 1,1

    pl = 0
    cnum = 0
    oddc = 0
    for nex in lis[v]:
        if nex != p:
            lf,nc = dfs(nex,v)
            pl += lf
            cnum += nc
            oddc += nc % 2

    if (N-(cnum+1)) % 2 == 1:
        oddc += 1

    if pl >= 2 or oddc >= 2:
        print ("First")
        sys.exit()

    return 0,cnum+1


fi = None
for i in range(N):
    if len(lis[i]) > 1:
        fi = i
        break

dfs(fi,fi)
print ("Second")
N=101
if N%2 == 0:
  print(int(N/2))
else:
  print(int(round(N/2))

### FIXED CODE ###

N = int(input())
if N % 2 == 0:
  n = N / 2
else:
  n = int((N+1) / 2)
print(int(n))
from collections import defaultdict

N, M = map(int, input().split())
xy = [list(map(int, input().split())) for _ in range(M)]

g = {i:[] for i in range(110000)}
g2 = {i:[] for i in range(110000)}
done = [0] * (N+1)
memo = [0] * (N+1)
for x, y in xy:
    g[x].append(y)
    g2[y].append(x)

def dp_2(v):
    max_len = 0
    if done[v] == 1:
        return memo[v]
    
    for i in g2[v]:
        max_len = max(max_len, dp2(i) + 1)
    done[v] = 1
    memo[v] = max_len
    return max_len
    
    
def dp(v):
    max_len = 0
    if done[v] == 1:
        return memo[v]
    else:
        for to in g[v]:
            max_len = max(max_len, dp(to)+1)
        done[v] = 1
        memo[v] = max_len
        return max_len

ans = 0
for v in range(1, N+1):
    ans = max(ans, dp2(v))
print(ans)

### FIXED CODE ###

from collections import defaultdict, deque

def topological_sort(vertex:list, edge:list):
    graph = {i: [] for i in vertex}
    for i, j in edge:
        graph[i].append(j)
        
    inp_cnt = defaultdict(int)
    outs = defaultdict(list)
    for inp, out in edge:
        inp_cnt[out] += 1
        outs[inp].append(out)

    result = []
    queue = deque([i for i in vertex if inp_cnt[i]==0])
    while queue:
        v = queue.popleft()
        result.append(v)
        for v2 in outs[v]:
            inp_cnt[v2] -= 1
            if inp_cnt[v2] == 0:
                queue.append(v2)
    return result

N, M = map(int, input().split())
vertex = list(range(1, N+1))
edge = [list(map(int, input().split())) for _ in range(M)]
graph = {i: [] for i in vertex}
for i, j in edge:
    graph[i].append(j)

sorted_vertecies = topological_sort(vertex, edge)
dp = [0] * (N+1)
for i in sorted_vertecies:
    ends = graph[i]
    for j in ends:
        dp[j] = max(dp[j], dp[i] + 1)
print(max(dp))
n = int(input())
k = (int(input()))
a = [(1<<x)+k*(n-x) for x in range(1,n)]
print(min(a))


### FIXED CODE ###

n = int(input())
k = (int(input()))
a = [(1<<x)+k*(n-x) for x in range(n+1)]
print(min(a))
a = int(input())
number = a.split()
total = sum(number)
if a % total == 0:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a = (input())
number_2 = [int(s) for s in a]
total = sum(number_2)
if int(a) % total == 0:
  print('Yes')
else:
  print('No')
n=int(input())
l=list(map(int,input().split()))
d={i:l.count(i) for i in set(l)}
t=tuple(l.keys())
m=len(t)
T=0
for i in range(m-2):
  a=t[i]
  for j in range(m-i-1):
    b=t[i+j+1]
    for k in range(m-i-j-2):
      c=t[i+j+k+2]
      if a<b+c and b<c+a and c<a+b:
        T+=d{a}*d{b}*d{c}
print(T)

### FIXED CODE ###

l = list(map(int, input().split()))
a = l[0]
b = l[1]
s = a - 2*b
if s < 0:
  print(0)
else:
  print(s)