Harryxun/stf_run huggingface dataset:
A, B = map(int, input().split())

S = A - 2B
if S > 0:
    print(S)
else:
    print(0)

### FIXED CODE ###

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

S = A - 2*B
if S > 0:
    print(S)
else:
    print(0)
ap(int,input().split())

### FIXED CODE ###

H,W = map(int,input().split())
h,w = map(int,input().split())

print((H-h)*(W-w))
n=int(intput())

print(n+n**n+n***n)

### FIXED CODE ###

n = int(input())

print(n + pow(n,2)+pow(n,3))
import collections
N = int(input())
A = list(map(int,input().split()))
CA = collections.Counter(A)
S = 0
for i in CA.values():
    S += i*(i-1)/2
for x in range(A):
    print(S - A.count(x) + 1)

### FIXED CODE ###

import collections
N = int(input())
A = list(map(int,input().split()))
CA = collections.Counter(A)
S = 0
for i in CA.values():
    S += i*(i-1)//2
for x in A:
    print(S - CA[x] + 1)
mine = []
h, w = map(int, input().split())
for i in range(h):
    mine.append(list(input()[:]))
ans = [[0 for i in range(w)] for j in range(w)]
for i in range(h):
    for j in range(w):
        if mine[i][j] == '#':
            if i != 0:
                ans[i-1][j] += 1
            if j != 0:
                ans[i][j-1] += 1
            if i != h-1:
                ans[i+1][j] += 1
            if j != w-1:
                ans[i][j+1] += 1
            if i != 0 and j != 0:
                ans[i-1][j-1] += 1
            if i != 0 and j != w-1:
                ans[i-1][j+1] += 1
            if i != h-1 and j != 0:
                ans[i+1][j-1] += 1
            if i != h-1 and j != w-1:
                ans[i+1][j+1] += 1

for i in range(h):
    for j in range(w):
        if mine[i][j] == "#":
            print("#", end="")
        else:
            print(ans[i][j], end="")
    print()


### FIXED CODE ###

mine = []
h, w = map(int, input().split())
for i in range(h):
    mine.append(list(input()[:]))
ans = [[0 for i in range(w)] for j in range(h)]
for i in range(h):
    for j in range(w):
        if mine[i][j] == '#':
            if i != 0:
                ans[i-1][j] += 1
            if j != 0:
                ans[i][j-1] += 1
            if i != h-1:
                ans[i+1][j] += 1
            if j != w-1:
                ans[i][j+1] += 1
            if i != 0 and j != 0:
                ans[i-1][j-1] += 1
            if i != 0 and j != w-1:
                ans[i-1][j+1] += 1
            if i != h-1 and j != 0:
                ans[i+1][j-1] += 1
            if i != h-1 and j != w-1:
                ans[i+1][j+1] += 1

for i in range(h):
    for j in range(w):
        if mine[i][j] == "#":
            print("#", end="")
        else:
            print(ans[i][j], end="")
    print()
mod = 10 ** 9 + 7
n = int(input())

a_sum = 0
sq_sum = 0
for a in map(int, input().split()):
  a_sum = (a_sum + a) % mod
  sq_sum = (sq_sum + a * a) % mod
res = (a_sum * a_sum - sq_sum) % mod
print(-(p // 2) % mod * res % mod)

### FIXED CODE ###

mod = 10 ** 9 + 7
n = int(input())

a_sum = 0
sq_sum = 0
for a in map(int, input().split()):
  a_sum = (a_sum + a) % mod
  sq_sum = (sq_sum + a * a) % mod
res = (a_sum * a_sum - sq_sum) % mod
print(-(mod // 2) % mod * res % mod)
N = int(input())
S = input()

a_lst = ([i for i, x in enumerate(S) if x == 'A'])
count = 0
for j in a_lst:
    if len(S) >= j + 2:
        if S[j+1] == 'B' and S[j+2] == 'C':
            count += 1
print(count)

### FIXED CODE ###

N = int(input())
S = input()

a_lst = ([i for i, x in enumerate(S) if x == 'A'])
count = 0
for j in a_lst:
    if len(S) >= j + 3:
        if S[j+1] == 'B' and S[j+2] == 'C':
            count += 1
print(count)
N = int(input())
S = []
count = 0
for i in range(N):
  S.append(input())
  if S[i] != '0':
    count += 1
    for j in range(i+1,N):
      if (S[j] != '0'):
        if S[i] == S[j]:
          S[j] = '0'
         
print (count)  


### FIXED CODE ###

import collections

N = int(input())
S = []
count = 0
for i in range(N):
  S.append(input())

count = len(collections.Counter(S))
         
print (count)
S=list(input())
K="Yes"
for i in range (0,len(S)):
	if i%2==0:
	    if S[i]=="L" :
        	K="No"
        	break
        else:
        	continue
    else :
		if S[i]=="R" :
        	K="No"
        	break
    	else:
        	continue
print(K)


### FIXED CODE ###

S=input()
if S[0]=="R":
    print("Sunny")
elif S[0]=="S":
    print("Cloudy")
else:
    print("Rainy")
N = int(input())
h = list(map(int, input().split(" ")))

dp = [1000000 for i in range(N+10)]
dp[1] = 0

for i in range(1, N-1):
    dp[i + 1] = min(dp[i + 1], abs(h[i + 1] - h[i]) + dp[i])
    dp[i + 2] = min(dp[i + 2], abs(h[i + 2] - h[i]) + dp[i])

print(dp[N])

### FIXED CODE ###

# dp[i]: i+1にくるまでにかかったコストの最小値
N = int(input())
h = list(map(int, input().split()))
dp = [float("inf") for _ in range(N)]
dp[0] = 0
for i in range(N-1):
    dp[i+1] = min(dp[i+1], dp[i]+abs(h[i]-h[i+1]))
    if i < N-2:
        dp[i+2] = min(dp[i+2], dp[i]+abs(h[i]-h[i+2]))
print(dp[-1])
H,W = map(int, input().split())
if H == 0 and W == 0:
    break

print ((('#' * W) + '\n') * H)

### FIXED CODE ###

while True:
    H,W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print (("#" * W ))
    print ()
import math
def calc_pattern(stairs):
    if stairs<=3:
        return stairs
    d=stairs//2+1
    l=[(math.factorial(i+(stairs-i*2))/math.factorial(i)/math.factorial(stairs-i*2))%1000000007  for i in range(d)]
    return (sum(l))%1000000007

N,M=map(int,input().split())
A=[-1]
A.extend([int(input()) for m in range(M)])
A.append(N+1)
s=1
for m in range(M+1):
    if A[m+1]==1 or A[m]==N-1:
        continue
    if A[m]+1==A[m+1]:
        print(0)
        exit()
    else:
        s*=calc_pattern(A[m+1]-1 - (A[m]+1))
        s%=1000000007
print(int(s))


### FIXED CODE ###

N,M=map(int,input().split())
A=[int(input()) for n in range(M)]
S=[1]*(N+1)
for a in A:
  S[a]=0
for i in range(2,N+1):
  S[i]=(S[i-1]+S[i-2])%1000000007*S[i]

print(S[-1])
N = int(input())
adj = [[] for _ in range(N+1)]
for e in range(1,N):
  a,b = map(int, input().split())
  adj[a].append((b,e))
  adj[b].append((a,e))

#print(adj)

col_num = max([len(ad) for ad in adj])
edge_color = [0]*N
visited = [False]*(N+1)

def dfs(v,e):
  visited[v] = True
  #print(v,e,edge_color)
  col_lis = [i for i in range(1,col_num+1)]
  if e != 0:
    col_lis.remove(edge_color[e])
  #print(col_lis)
  if len(adj[v])==0:
    return None
  for w,e in adj[v]:
    if visited[w]==True:
      continue
    #if edge_color[e] == 0:
    edge_color[e] = col_lis.pop(0)
    dfs(w,e)
  return None
#print(col_num)
dfs(1,0)

print(col_num)
for i in range(1,N):
  print(edge_color[i])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)

N = int(input())
adj = [[] for _ in range(N+1)]
for e in range(1,N):
  a,b = map(int, input().split())
  adj[a].append((b,e))
  adj[b].append((a,e))

#print(adj)

col_num = max([len(ad) for ad in adj])
edge_color = [0]*N
visited = [False]*(N+1)

def dfs(v,c=-1):
  #print(v,e,edge_color)
  #col_lis = [i for i in range(1,col_num+1)]
  #if e >0:
    #col_lis.remove(edge_color[e])
  color = 1
  for w,f in adj[v]:
    if visited[w]==False:
      visited[v] = True
      if c==color: color+=1
      edge_color[f] = color
      dfs(w,color)
      color+=1

dfs(1)

print(col_num)
for i in range(1,N):
  print(edge_color[i])
import sys
input = sys.stdin.readline

def main():
  s = input()
  n = len(s)
  mod = 10**9+7
  dp = [[0]*13 for _ in range(n+1)]
  dp[0][0] = 1
  d = {(j, k):(10*j+k)%13 for k in range(10) for j in range(13)}
  for i in range(n):
    if s[i] != "?":
      t = int(s[i])
      for j in range(13):
        dp[i+1][d[(j, t)]] += dp[i][j]
        dp[i+1][d[(j, t)]] %= mod
    else:
      for k in range(10):
        for j in range(13):
          dp[i+1][d[(j, k)]] += dp[i][j]
          dp[i+1][d[(j, k)]] %= mod
  print(dp[n][5]%mod)

if __name__ == '__main__':
  main()

### FIXED CODE ###

s = input()
n = len(s)
mod = 10**9+7
dp = [[0]*13 for _ in range(n+1)]
dp[0][0] = 1
d = {(j, k):(10*j+k)%13 for k in range(10) for j in range(13)}
for i in range(n):
  if s[i] != "?":
    t = int(s[i])
    for j in range(13):
      dp[i+1][d[(j, t)]] += dp[i][j]
      dp[i+1][d[(j, t)]] %= mod
  else:
    for k in range(10):
      for j in range(13):
        dp[i+1][d[(j, k)]] += dp[i][j]
        dp[i+1][d[(j, k)]] %= mod
print(dp[n][5]%mod)
N = int(input())
SP = []
for _ in range(N):
    SP.append([i for i in input().split()])
for n in range(N):
    SP[n][1] = str(100 - int(SP[n][1])).rjust(3,'0')
SP2 = []
for n in range(N):
    SP2.append(SP[0]+SP[1])
ans = sorted(range(len(SP2)), key=lambda k: SP2[k])
for i in ans:
    print(i+1)

### FIXED CODE ###

N = int(input())
SP = []
for _ in range(N):
    SP.append([i for i in input().split()])
for n in range(N):
    SP[n][1] = str(100 - int(SP[n][1])).rjust(3,'0')
SP2 = []
for n in range(N):
    SP2.append(SP[n][0]+SP[n][1])
ans = sorted(range(len(SP2)), key=lambda k: SP2[k])
for i in ans:
    print(i+1)
H, W, D = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
Q = int(input())
LR = [list(map(int, input().split())) for _ in range(Q)]

number_dict = {}
for h in range(H):
    for w in range(W):
        number_dict[A[h][w]] = (w+1, h+1)
        
       
for i in range(Q):
    tmp = 0
    now = LR[i][0]
    now_state = number_dict[now]
    
    while True:
        if now == LR[i][1]:
            break
        
        tmp += abs(number_dict[now+D][0] - now_state[0]) + abs(number_dict[now+D][1] - now_state[1])
        now = now + D
        now_state = number_dict[now+D]
        

            
    print(tmp)
        



### FIXED CODE ###

H, W, D = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]
Q = int(input())
LR = [list(map(int, input().split())) for _ in range(Q)]

number_dict = {}
for h in range(H):
    for w in range(W):
        number_dict[A[h][w]] = (w+1, h+1)
        
        
number = [0 for _ in range(H*W+1)]
for i in range(H*W):
    now = H * W - i
    
    if now + D > H * W:
        pass
    
    else:
        number[now] = number[now + D] + abs(number_dict[now+D][0] - number_dict[now][0]) + abs(number_dict[now+D][1] - number_dict[now][1])
       

for i in range(Q):
    res = number[LR[i][0]] - number[LR[i][1]]
            
    print(res)
n = int(input())
A = list(map(int, input().split()))

ans = 1
for i in A:
  ans = ans * i
  if ans > 10 ** 18:
	  print("-1")
      break
  else:
    continue
else:
  print(ans)

### FIXED CODE ###

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

ans = 1
if 0 in A:
  print("0")
else:
  for i in A:
    ans = ans * i
    if ans > 10 ** 18:
      print("-1")
      break
    else:
      continue
  else:
    print(ans)
N, K = map(int, input().split())
mod = 10**9 + 7
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
def p(n, k):
    x = 1
    for i in range(k):
        x *= n - i
        x %= mod
    return x
def f(x, par):
    L = len(G[x])
    if x == par:
        if L <= K-1:
            ans = K*p(K-1,L) % mod
        else:
            return 0
    elif x != par:
        if L-1 <= K-2:
            ans = p(K-2,L-1)
        else:
            return 0
    for i in G[x]:
        if i != par:
            ans *= f(i, x)
            ans %= mod
    return ans
print(f(0, 0))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
N, K = map(int, input().split())
mod = 10**9 + 7
G = [[] for _ in range(N)]
for _ in range(N-1):
    a, b = map(int, input().split())
    G[a-1].append(b-1)
    G[b-1].append(a-1)
def p(n, k):
    x = 1
    for i in range(k):
        x *= n - i
        x %= mod
    return x
def f(x, par):
    L = len(G[x])
    if x == par:
        if L <= K-1:
            ans = K*p(K-1,L) % mod
        else:
            return 0
    elif x != par:
        if L-1 <= K-2:
            ans = p(K-2,L-1)
        else:
            return 0
    for i in G[x]:
        if i != par:
            ans *= f(i, x)
            ans %= mod
    return ans
print(f(0, 0))
S = input().split("/")

if int(S[5]) < 5 :
	print('Heisei')
else :
	print('TBD')

### FIXED CODE ###

s = input()

if s <= "2019/04/30":
    print("Heisei")
else:
    print("TBD")
a = int(input())
if a == 1:
  print("Hello Wor\ld")
elif:
  b = int(input())
  c = int(input())
  print(b + c)

### FIXED CODE ###

a = int(input())
if a == 1:
  print("Hello World")
else:
  b = int(input())
  c = int(input())
  print(b + c)
while True:
    n = int(input())
    if n == 0: break
    print(sum([int(input()) for _ in range(n)]))

### FIXED CODE ###

while True:
    n = int(input())
    if n == 0:
        break
    print(sum(int(input()) for i in range(n // 4)))
def wa(h, w, f):
    if not (0 <= h < H and 0 <= w < W):
        return
    elif mapp[h][w] != f:
        return
    else:
        mapp[h][w] = '$'
        wa(h, w+1, f)
        wa(h-1, w, f)
        wa(h, w-1, f)
        wa(h+1, w, f)

while True:
    W, H = map(int, raw_input().split())
    if H == 0 and W == 0: break
    mapp = [list(raw_input()) for i in range(H)]
    count = 0
    for h in range(H):
        for w in range(W):
            if mapp[h][w] == '@':
                count += 1
                wa(h, w, '@')
            elif mapp[h][w] == '#':
                count += 1
                wa(h, w, '#')
            elif mapp[h][w] == '*':
                count += 1
                wa(h, w, '*')
    else:
        print count

### FIXED CODE ###

import sys
sys.setrecursionlimit(20000)
def wa(h, w, f):
    if not (0 <= h < H and 0 <= w < W):
        return
    elif mapp[h][w] != f:
        return
    else:
        mapp[h][w] = '$'
        wa(h, w+1, f)
        wa(h-1, w, f)
        wa(h, w-1, f)
        wa(h+1, w, f)

while True:
    H, W = map(int, raw_input().split())
    if H == 0 and W == 0: break
    mapp = [list(raw_input()) for i in range(H)]
    count = 0
    for h in range(H):
        for w in range(W):
            if mapp[h][w] == '@':
                count += 1
                wa(h, w, '@')
            elif mapp[h][w] == '#':
                count += 1
                wa(h, w, '#')
            elif mapp[h][w] == '*':
                count += 1
                wa(h, w, '*')
    else:
        print count
def dfs(x, g, vis):
    if vis[x]:
        return
    vis[x] = 1
    for y in g[x]:
        dfs(y, g, vis)

def main():
    N, M = map(int, input().split())
    g = [[] for _ in range(N)]
    for i in range(M):
        X, Y, Z = map(int, input().split())
        X -= 1
        Y -= 1
        g[X].append(Y)
        g[Y].append(X)
    vis = [0] * N

    ans = 0
    for i in range(N):
        if vis[i] == 0:
            dfs(i, g, vis)
            ans += 1
    print(ans)

main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

def dfs(x, g, vis):
    if vis[x]:
        return
    vis[x] = 1
    for y in g[x]:
        dfs(y, g, vis)

def main():
    N, M = map(int, input().split())
    g = [[] for _ in range(N)]
    for i in range(M):
        X, Y, Z = map(int, input().split())
        X -= 1
        Y -= 1
        g[X].append(Y)
        g[Y].append(X)
    vis = [0] * N

    ans = 0
    for i in range(N):
        if vis[i] == 0:
            dfs(i, g, vis)
            ans += 1
    print(ans)

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


ans = 0

# N = pb + r

for b in range(k+1,n+1):
    p = n//b
    r = n%b
    ans += p * max(0,b-k) + max(0, r-k+1)


if k==0:
    ans -= n

print(

### FIXED CODE ###


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


ans = 0

# N = pb + r

for b in range(k+1,n+1):
    p = n//b
    r = n%b
    ans += p * max(0,b-k) + max(0, r-k+1)


if k==0:
    ans -= n

print(ans)
a,b,c  = map(int, input().split())
d,e,f  = map(int, input().split())
g,h,i  = map(int, input().split())
n=int(input())
A = []
for j in range(n):
    A.append(int(input()))
if (a in A) and (b in A) and (c in A):
    print("Yes")
elif d in A and e in A and f in A:
    print("Yes")
elif g in A and h in A and i in A:
    print("Yes")
elif a in A and d in A and g in A:
    print("Yes")
elif b in A and e in A and h in A:
    print("Yes")
elif c in A and f in A and i in A:
    print("Yes")
elif a in A and e in A and i in A:
    print("Yes")
elif c in A and e in A and g in A:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n=int(input())
if n%2==0:
    print(n//2)
else:
    print(n//2+1)
happy,newyear,enjoy

### FIXED CODE ###

a = input()

b = a.replace(",", " ")

print(b)
n, q = map(int, input().split(' '))
     
inf = [[] for _ in range(n)]
for i in range(n-1):
    a, b = map(int, input().split(' '))
    inf[a-1].append(b-1)
    inf[b-1].append(a-1)
point = [0 for _ in range(n)]
for i in range(q):
    p, x = map(int, input().split(' '))
    point[p-1] += x
visit = [0 for _ in range(n)]
def add(num):
    if len(inf[num]) == 1 and visit[num] == 1:
        return 0
    visit[num] = 1
    for k in inf[num]:
        if visit[k] == 0:
            point[k] += point[num]
            add(k)
    return 0
add(0)
print(*point)

### FIXED CODE ###

def main():
    n, q = map(int, input().split(' '))
    import sys
    from collections import deque
    sys.setrecursionlimit(10**7)

    visit = [True for _ in range(n)]
    point = [0 for _ in range(n)]
    dic = [[] for _ in range(n)]
    for _ in range(n-1):
        a, b = map(int, input().split(' '))
        dic[a-1].append(b-1)
        dic[b-1].append(a-1)
    for _ in range(q):
        p, x = map(int, input().split(' '))
        point[p-1] += x
    next_visit = deque()
    next_visit.append(0)
    visit[0] = False
    counter = 1
    while counter < n:
        t = next_visit.pop()
        for s in dic[t]:
            if visit[s]:
                point[s] += point[t]
                visit[s] = False
                counter += 1
                next_visit.append(s)
    print(*point)
if __name__ == '__main__':
    main()
n,k = (int(x) for x in input().split())
mod = 10**9 + 7
ans = n - k + 1
print(ans)
for i in range(1,k):
  ans = int(ans*(n-k+1-i)*(k-i)/(i*(i+1)))
  #ans = ans%mod
  print(ans%mod)
  

### FIXED CODE ###

import math
N,K = (int(x) for x in input().split())
R = N - K
mod = 10**9 + 7

def fact(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
  if N - K + 1 < i:
    ans = 0
  else:
    ans = fact(R+1, i)*fact(K-1,i-1)
  print(int(ans)%mod)
# -*- coding: utf-8 -*-

N,W = map(int, input().split())
wN = []
vN = []
for i in range(N):
    w,v = map(int, input().split())
    wN.append(w)
    vN.append(v)

dp = [[0] * (3*(N-1)+1)*100 for i in range(N+1)]

# 答えが明らかな範囲はDPに含めない
if W < wN[0]:
    print(0)
    exit()
elif W >= sum(wN):
    print(sum(vN))
    exit()

# wNの範囲はかなり限定されているので、オフセットを用意
# (-1するのは0地点を残すため)
offset = wN[0]-1
W -= offset

for i in range(N):
    for j in range(offset, (3*(N-1)+1)*100 + offset):

        if wN[i] <= j:
            # max(0,～)で0未満を探しに行くのを避ける
            dp[i+1][j-offset] = max(dp[i][max(0,j-wN[i]-offset)] + vN[i], dp[i][j-offset])
        else:
            dp[i+1][j-offset] = dp[i][j-offset]

print(dp[N][W])

### FIXED CODE ###

# -*- coding: utf-8 -*-

"""
・メモ化再帰
"""

import sys
def input(): return sys.stdin.readline().strip()
sys.setrecursionlimit(10 ** 9)

from collections import defaultdict

N, W = map(int, input().split())
wN = [0] * N
vN = [0] * N
for i in range(N):
    wN[i], vN[i] = map(int, input().split())

# memo[i][j]: i番目以降の品物から重さの和がj以下なるように選んだときの価値の和の最大値
memo = [defaultdict(lambda: -1) for i in range(N+1)]

def dfs(cur, wei):
    # 既に調べた場所はそのまま返却
    if memo[cur][wei] != -1:
        return memo[cur][wei]
    # 品物を最後まで見た
    if cur == N:
        res = 0
    # まだ余力があるから両方試す
    elif wei >= wN[cur]:
        res = max(dfs(cur+1, wei-wN[cur]) + vN[cur], dfs(cur+1, wei))
    # もうこの回の荷物は入らない
    else:
        res = dfs(cur+1, wei)
    # ここまでのベストな値をメモに記録してから返却
    memo[cur][wei] = res
    return res
# 0番目以降で容量W以下の場合の結果を表示
print(dfs(0, W))
S=input()
T=S[:4]+" "+S[4:]
ptint(T)

### FIXED CODE ###

S=input()
T=S[:4]+" "+S[4:]
print(T)
from sys import stdin
from math import factorial
n,k = map(int,stdin.readline().rstrip().split())
li = list(map(int,stdin.readline().rstrip().split()))
nai = 0
ato = 0
point = 0
for i in range(n):
    for s in range(i+1,n):
        if li[i] > li[s]:
            nai += 1
    for v in range(n):
        if li[i] > li[v]:
            ato += 1
def combinations_count(j,r):
    return factorial(j) // (factorial(j - r) * factorial(r))
point += (nai*k)+(ato*combinations_count(k,2))
print(point%(10**9+7))

### FIXED CODE ###

from sys import stdin
n,k = map(int,stdin.readline().rstrip().split())
li = list(map(int,stdin.readline().rstrip().split()))
nai = 0
ato = 0
point = 0
for i in range(n):
    for s in range(i+1,n):
        if li[i] > li[s]:
            nai += 1
    for v in range(n):
        if li[i] > li[v]:
            ato += 1
point += (nai*k)+(ato*k*(k-1)//2)
print(point%(10**9+7))
a=input('a')
b=input('b')
if (a*b)%2 ==0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

a,b=map(int,input().split())
if (a*b)%2 ==0:
  print('Even')
else:
  print('Odd')
x,a,b = map(int,input().split())
kigen = b-a
if x>kigen:
  print('delicious')
elif x=kigen:
  print('safe')
else:
  print('dangerous')

### FIXED CODE ###

x,a,b = map(int,input().split())
kigen = b-a
if 0>=kigen:
    print('delicious')
elif 0<kigen<=x:
    print('safe')
else:
    print('dangerous')
import math
import sys
from collections import defaultdict

input = sys.stdin.readline
mod = 1000000007

n = int(input())

n2 = [1]
for _ in range(n):
    n2.append(n2[-1] * 2 % mod)

zero = 0
plus = defaultdict(int)
minus = defaultdict(int)

for _ in range(n):
    a, b = map(int, input().split())
    if a * b == 0:
        zero += 1
    p = math.gcd(a, b)
    a //= p
    b //= p
    if a * b > 0:
        plus[(abs(a), abs(b))] += 1
    else:
        minus[(abs(b), abs(a))] += 1


ans = zero + 1
ans %= mod
n -= zero

for k, v in plus.items():
    if minus[k] > 0:
        ans *= (n2[v] + n2[minus[k]] - 1)
        ans %= mod
        n -= v + minus[k]

ans *= n2[n]
ans %= mod
print(ans - 1)


### FIXED CODE ###

import math
import sys
from collections import defaultdict

input = sys.stdin.readline
mod = 1000000007

n = int(input())

n2 = [1]
for _ in range(n):
    n2.append(n2[-1] * 2 % mod)

zero = 0
plus = defaultdict(int)
minus = defaultdict(int)

for _ in range(n):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        zero += 1
        continue
    elif a == 0:
        plus[(1, 0)] += 1
    elif b == 0:
        minus[(1, 0)] += 1
    else:
        p = math.gcd(a, b)
        a //= p
        b //= p
        if a * b > 0:
            plus[(abs(a), abs(b))] += 1
        else:
            minus[(abs(b), abs(a))] += 1

n -= zero
ans = 1

for k, v in plus.items():
    if minus[k] > 0:
        ans *= (n2[v] + n2[minus[k]] - 1)
        ans %= mod
        n -= v + minus[k]

ans *= n2[n]
ans %= mod
ans += zero - 1
ans %= mod
print(ans)
a,b,c,d=map(int,input().split())
x=a+b
y=c+d
if x>y:
  print("Left")
 elif x<y:
  print("Right")
 else:
  print("Balanced")

### FIXED CODE ###

a,b,c,d=list(map(int,input().split()))
x=a+b
y=c+d
if x>y:
  print("Left")
elif x<y:
  print("Right")
else:
  print("Balanced")
X, K, D = map(int, input().split())


def f(C):
    NX = float("inf")
    if C > K:
        return NX

    if K % 2 == 0:
        if C % 2 == 0:
            NX = abs(abs(X) - C * D)
        else:
            NX = abs(abs(X) - (C + 1) * D)
            if C > 0:
                NX = min(NX, abs(abs(X) - (C - 1) * D))
    else:
        if C % 2 == 0:
            NX = abs(NX, abs(X) - (C + 1) * D)
            if C > 0:
                NX = min(NX, abs(abs(X) - (C - 1) * D))
        else:
            NX = abs(abs(X) - C * D)

    return NX


C = min(abs(X) // D, K)

print(min(f(C), f(C + 1)))


### FIXED CODE ###

X, K, D = map(int, input().split())


def f(C):
    NX = float("inf")
    if C > K:
        return NX

    if K % 2 == 0:
        if C % 2 == 0:
            NX = abs(abs(X) - C * D)
        else:
            NX = abs(abs(X) - (C + 1) * D)
            if C > 0:
                NX = min(NX, abs(abs(X) - (C - 1) * D))
    else:
        if C % 2 == 0:
            NX = abs(abs(X) - (C + 1) * D)
            if C > 0:
                NX = min(NX, abs(abs(X) - (C - 1) * D))
        else:
            NX = abs(abs(X) - C * D)

    return NX


C = min(abs(X) // D, K)

print(min(f(C), f(C + 1)))