Harryxun/stf_run huggingface dataset:
import math

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

k = a + b + 2 * math.sqrt(a * b)) / c - 1

if k < 0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

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

if c - a - b > 0 and (c - a - b) ** 2  > 4 * a * b:
    print("Yes")
else:
    print("No")
N = int(input())
H = list(map(int, input().split()))

H = H + [10**9]
dp = [-1] * N

def dfs(pos):
  global N, H, dp

  if pos >= N:
    return 10**9
  if pos == N - 1:
    return 0
  if dp[pos] != -1:
    return dp[pos]

  step1 = dfs(pos+1) + abs(H[pos+1] - H[pos])
  step2 = dfs(pos+2) + abs(H[pos+2] - H[pos])
  dp[pos] = min(step1, step2)
  #print(pos, step1, step2)
  return(dp[pos])

ans = dfs(0)
#print(dp)
print(ans)

### FIXED CODE ###

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

cost = [0] * N
for i in range(1, N):
  d1 = cost[i-1] + abs(H[i] - H[i-1])
  d2 = cost[i-2] + abs(H[i] - H[i-2]) if i > 1 else 1e6
  cost[i] = min(d1, d2)
#print(cost)
ans = cost[N-1]
print(ans)
import math

def main():
    n, m = map(int,input().split())
    s = input()
    t = input()

    l = n * m // math.gcd(n,m)

    nlist = [0 for i in range(n)]
    mlist = [0 for i in range(m)]
    for i in range(n):
        nlist[i] =  i*l//n

    for i in range(m):
        mlist[i] =  i*l//m

    src_set = set(nlist)
    tag_set = set(mlist)
    matched_list = list(src_set.intersection(tag_set))

    for i in matched_list:
        s_index = nlist.index(i)
        t_index = mlist.index(i)

        if s[s_index] != t[t_index]:
            print("-1")
            exit()

    print(l)




if __name__ == "__main__":
        main()


### FIXED CODE ###

def main():
    n, m = map(int,input().split())
    s = input()
    t = input()

    l = n * m // gcd(n,m)

    nlist = [0 for i in range(n)]
    mlist = [0 for i in range(m)]
    for i in range(n):
        nlist[i] =  i*l//n

    for i in range(m):
        mlist[i] =  i*l//m

    src_set = set(nlist)
    tag_set = set(mlist)
    matched_list = list(src_set.intersection(tag_set))

    for i in matched_list:
        s_index = nlist.index(i)
        t_index = mlist.index(i)

        if s[s_index] != t[t_index]:
            print("-1")
            exit()

    print(l)

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

if __name__ == "__main__":
        main()
S = (input().split())

if S[2]==S[3] and S[4]==S[5]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

s = input()
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")
N = int(input())
i,j = 1,1
for x in range(i,3501):
    for y in range(j,3501):
        z = N*x*y/(4*x*y - N*y - N*x)
        if z == int(z) and z >= 1:
            print(x,y,int(z))
            exit()

### FIXED CODE ###

N = int(input())
i = 1
while i<=7000:
    if N/i >= 4:
        i += 100
        continue
    if i >100:
        i -= 100
    for x in range(i,3501):
        for y in range(i,3501):
            a = (4*x*y - N*y - N*x)
            if a == 0:
                continue
            z = N*x*y/a
            if z == int(z) and z >= 1:
                print(x,y,int(z))
                exit()
A = input()
B = input()

ans = ['1', '2', '3']

for i in range(len(ans)):
  if ans[i] == A or ans[i] == B:
    del ans[i]
    
print(ans[0])


### FIXED CODE ###

A = int(input())
B = int(input())
print(6 - A - B)
#!/usr/bin/env python
# coding: utf-8

# In[24]:


N,K = list(map(int, input()))
A = list(map(int, input()))


# In[16]:


def main():
    x0 = 1
    for i in range(K):
        x0 *= A[i]
    x = x0
    for j in range(K,N):
        score = x*A[j]//A[j-K]
        if score > x:
            print("Yes")
        else:
            print("No")
        x = score


# In[17]:


if __name__ == '__main__':
    main()


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[2]:


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


# In[9]:


def main():
    for j in range(K,N):
        if A[j] > A[j-K]:
            print("Yes")
        else:
            print("No")


# In[10]:


if __name__ == '__main__':
    main()


# In[ ]:
a,b=map(int,input().split())
count=0
for i in range(a,b+1):
  i=str(i)
  if i==i[::-1]:
    count+=1
print(count)


### FIXED CODE ###

a=list(input())
b=list(input())
c=list(input())
print(a[0]+b[1]+c[2])
import collections
def dp(node,cache,edge):
  if node in cache:
    return cache[node]
  lcl_max=0
  for child in edge[node]:
    cache[child]=dp(child,cache,edge)
    lcl_max=max(lcl_max,1+cache[child])
  return lcl_max
 
max_dis=0
cache,edge={},collections.defaultdict(list)
n,m=map(int,input().split())
for _ in range(m):
  a,b=map(int,input().split())
  edge[a].append(b)
for node in range(1,n+1):
  max_dis=max(max_dis,dp(node,cache,edge))
 
  

### FIXED CODE ###

import collections
import sys
sys.setrecursionlimit(10**9)
cache,edge={},collections.defaultdict(list)
def dp(node):
  if node in cache:
    return cache[node]
  lcl_max=0
  for child in edge[node]:
    
    lcl_max=max(lcl_max,1+dp(child))
  cache[node]=lcl_max
  return lcl_max
 
max_dis=0

n,m=map(int,input().split())
for _ in range(m):
  a,b=map(int,input().split())
  edge[a].append(b)
for node in range(1,n+1):
  max_dis=max(max_dis,dp(node))
print(max_dis)
num1 = int(input().split())
num2 = list(map(int, input().split()))

num2.sort(reverse=True)
N=int(num1[0])
M=int(num1[1])
A=int(num2[M-1])

if A<N/M/4:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

n,m = map(int,input().split())
li = list(map(int,input().split()))
  
li.sort(reverse=True)
  
a=li[m-1]
b=sum(li)

if a>=b/4/m:
  print('Yes')
else:
  print('No')
N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
m.pop(m.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
edges = list(map(int, input().split()))
sum = 0
m = max(edges)
edges.pop(edges.index(m))
for i in range(len(edges)):
  sum += edges[i]
if m < sum:
  print("Yes")
else:
  print("No")
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]

    if A[0] != 0:
        print(-1)
        return
    answer = 0
    for i in range(N - 1):
        if A[i + 1] - A[i] > 1:
            print(-1)
            return
        elif A[i + 1] == A[i]:
            answer += A[i]
        elif A[i + 1] == A[i] + 1:
            flag = A[i + 1]
        else:
            answer += flag
            flag = 0
    answer += flag
    print(answer)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(20000000)

MOD = 10 ** 9 + 7
INF = float("inf")


def main():
    N = int(input())
    A = [int(input()) for _ in range(N)]

    if A[0] != 0:
        print(-1)
        return
    answer = 0
    flag = 0
    for i in range(N - 1):
        if A[i + 1] - A[i] > 1:
            print(-1)
            return
        elif A[i + 1] == A[i]:
            answer += A[i]
        elif A[i + 1] == A[i] + 1:
            flag = A[i + 1]
        else:
            answer += flag
            flag = A[i + 1]
    answer += flag
    print(answer)


if __name__ == "__main__":
    main()
a=int(input())
b=int(input())
if a*b%2===0
    print('even')
if a*b%2===1
    print('odd')

### FIXED CODE ###

a,b=map(int,input().split())
print("Even" if a*b%2==0 else "Odd")
n = int(input())
a = map(int, input().split())
print(sum(a) - 2 * min(a))


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
abs_a = list(map(abs, a))
print(sum(abs_a) if len([i for i in a if i < 0]) % 2 == 0 else sum(abs_a) - 2 * min(abs_a))
s = input()
n = len(s) + 1

a = [-1] * n

if s[0] == '<':
    a[0] = 0
if s[-1] == '>':
    a[-1] = 0

for i in range(1,n-2):
    if s[i] == '>' and s[i+1] == '<':
        a[i+1] = 0

for i in range(n-1):
    if a[i] == 0:
        tmp = 1
    else:
        tmp += 1
    if s[i] == '<':
        a[i+1] = tmp
    else:
        tmp = 0

for i in range(n-1):
    i = i * (-1) - 1
    if a[i] == 0:
        tmp = 1
    else:
        tmp += 1
    if s[i] == '>':
        a[i-1] = max(tmp, a[i-1])
    else:
        tmp = 0

print(sum(a))


### FIXED CODE ###

s = input()
n = len(s) + 1

a = [-1] * n
tmp = 0

if s[0] == '<':
    a[0] = 0
if s[-1] == '>':
    a[-1] = 0

for i in range(1,n-2):
    if s[i] == '>' and s[i+1] == '<':
        a[i+1] = 0

for i in range(n-1):
    if a[i] == 0:
        tmp = 1
    else:
        tmp += 1
    if s[i] == '<':
        a[i+1] = tmp
    else:
        tmp = 0

for i in range(n-1):
    i = i * (-1) - 1
    if a[i] == 0:
        tmp = 1
    else:
        tmp += 1
    if s[i] == '>':
        a[i-1] = max(tmp, a[i-1])
    else:
        tmp = 0

print(sum(a))
whlie True:
  HW=input().split()
  HW=[int(x) for x in HW]
  if HW[0] == 0: break
  print('#'*HW[1])
  for i in range(HW[0]-2):
    print('#',end='')
    print('.'*(HW[1]-2),end='"')
  print('#'*HW[1])
  print()

### FIXED CODE ###

while True:
  HW=input().split()
  HW=[int(x) for x in HW]
  if HW[0] == 0: break
  print('#'*HW[1])
  for i in range(HW[0]-2):
    print('#',end='')
    print('.'*(HW[1]-2),end='#')
    print()
  print('#'*HW[1])
  print()
S = input()


ans = [0]*(len(S))
cnt = 0
for i in range(len(S)-1):
    cnt += 1
    if S[i] == "R" and S[i+1] =="L":
        ans[i] += -(-cnt//2)
        ans[i+1] += cnt//2
        x = i
        cnt = 0
    if S[i] == "L" and S[i+1] =="R" or :
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        cnt = 0
    if i == len(S)-2:
        cnt += 1
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        

print(*ans)

### FIXED CODE ###

S = input()

ans = [0]*(len(S))
cnt = 0
for i in range(len(S)-1):
    cnt += 1
    if S[i] == "R" and S[i+1] =="L":
        ans[i] += -(-cnt//2)
        ans[i+1] += cnt//2
        x = i
        cnt = 0
    if S[i] == "L" and S[i+1] =="R":
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)
        cnt = 0
    if i == len(S)-2:
        cnt += 1
        ans[x] += cnt//2
        ans[x+1] += -(-cnt//2)    

print(*ans)
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from pprint import pprint as pp
from pprint import pformat as pf

import math


if __name__ == '__main__':
    a, b, n = map(int, input().split())
    if b > n:
        return print(n)
    else:
        return print(b - 1)


### FIXED CODE ###

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from pprint import pprint as pp
from pprint import pformat as pf

import math

def calc(a, b, x):
    return math.floor(a * x / b) - a * math.floor(x / b)

if __name__ == '__main__':
    a, b, n = map(int, input().split())
    if b > n:
        m = calc(a, b, n)
    else:
        m = calc(a, b, b - 1)
    print(m)
S = input()
count = 0
i = 0
while i < len(S)-2:
    if S[i] == S[i+1]:
        print(S[i])
        print(S[i+1]+S[i+2])
        i +=3
        count += 2  
    else:
        print(S[i])
        i +=1
        count += 1
if S[i] == S[i+1]:
    count += 1
else:
    count += 2
print(count)

### FIXED CODE ###

S = input()
count = 1
strings = []
strings.append(S[0])
stack = ''
for s in S[1:]:
    stack += s
    if strings[-1] == stack:
        continue
    else:
        strings.append(stack)
        stack = ''
        count+=1    

print(count)
int a=int(input())
int b=int(input())
if abs(a-b)%2==0:
  print(abs(a-b)/2)
else:
  print('IMPOSSIBLE')

### FIXED CODE ###

a,b=map(int,input().split())
if  (a+b)%2==0:
    print((a+b)//2)
         
else:
    print('IMPOSSIBLE')
n,k = map(int,input().split())
a = list(map(int,input().split()))

s = sorted(a,reverse=True)
mod = 10**9 + 7
ans = 1
#全部の要素が負の数であり奇数個の場合は大きい順に取ったものが答え
if k % 2 == 1 and s[0] < 0:
        for i in range(k):
            ans = ans * s[i] % mod
        print(ans)
        exit()　#終了

l = 0
r = n - 1
#次の処理のための計算　（kが奇数だった場合)
#この処理の必要性
#奇数個だった場合三個のうち二つで正の数の最大値を作れば良い
if k % 2 == 1:
  ans = ans * s[l]
  l += 1


for _ in range(k // 2):
  ml = s[l] * s[l + 1]
  mr = s[r] * s[r - 1]
  if ml > mr:
    ans = ans * ml % mod
    l += 2
  else:
    ans = ans * mr % mod
    r -= 2

print(ans)


### FIXED CODE ###

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

s = sorted(a,reverse=True)
mod = 10**9 + 7
ans = 1
#全部の要素が負の数であり奇数個の場合は大きい順に取ったものが答え
if k % 2 == 1 and s[0] < 0:
        for i in range(k):
            ans = ans * s[i] % mod
        print(ans)
        exit()#終了

l = 0
r = n - 1
#次の処理のための計算　（kが奇数だった場合)
#この処理の必要性
#奇数個だった場合三個のうち二つで正の数の最大値を作れば良い
if k % 2 == 1:
  ans = ans * s[l]
  l += 1


for _ in range(k // 2):
  ml = s[l] * s[l + 1]
  mr = s[r] * s[r - 1]
  if ml > mr:
    ans = ans * ml % mod
    l += 2
  else:
    ans = ans * mr % mod
    r -= 2

print(ans)
from collections import deque
import numpy as np
n,k = map(int,input().split())
a = list(map(int,input().split()))
roop_find = deque([0])
i = 0
count = 0
while a[i]-1 not in roop_find:
    roop_find.append(a[i]-1)
    i = a[i] - 1
    count += 1
    if count == k:
        print(i+1)
        break
    else:
        pass
b = roop_find.index(a[i]-1)
roop = list(roop_find)[b:count+1]
k-=b
e = k % (count+1-b)
print(roop[e]+1)


### FIXED CODE ###

n,k = map(int,input().split())
a = list(map(int,input().split()))
pos = 0
visit = [0] * n
move = []
loop = []
while visit[pos] != 2:
    if visit[pos] == 0:
        move.append(pos)
    else:
        loop.append(pos)
    visit[pos] += 1
    pos = a[pos] - 1
if len(move) > k:
    print(move[k]+1)
else:
    print(loop[(k-(len(move)-len(loop)))%len(loop)]+1)
N = input()
A = input()

if N % 500 <= A:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

n = int(input())
a = int(input())

if n % 500 <= a:
    print("Yes")
else:
    print("No")
input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

print(s)

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu)


### FIXED CODE ###

input_line = str(input())
s = []

for i in range(len(input_line)):
    if input_line[i] == '9':
        s.append('1')
    elif input_line[i] == '1':
        s.append('9')
    else:
        s.append(input_line[i])

mojiretu = ''

for x in s:
    mojiretu += x

print(int(mojiretu))
# 再帰関数
# 入力文字列の最大の正整数を返す
def func( in_str: str, prev: str ):
    if len(in_str) == 0:
        return 0
    num = 0
    new_str = ""
    for i in range(len(in_str)):
        s = in_str[0:i+1]
        if s == prev:
            continue
        else:
            new_str = in_str[i+1:]
            ret = func(new_str, s)
            if ret == -1:
                continue
            return 1 + ret

    return -1


s = input()
#s="aaaccacabaababc"
num = func( s, "")

print(num)

### FIXED CODE ###

# 再帰関数
# 入力文字列の最大の正整数を返す
# def func( in_str: str, prev: str ):
#     if len(in_str) == 0:
#         return 0
#     for i in range(len(in_str)):
#         s = in_str[0:i+1]
#         if s == prev:
#             continue
#         else:
#             new_str = in_str[i+1:]
#             ret = func(new_str, s)
#             if ret == -1:
#                 continue
#             return 1 + ret
#
#     return -1

#再帰じゃない
def func( in_str: str ):
    prev =""
    num_in_str = len(in_str)
    new_str = in_str
    stack_str =[]
    stack_start = []
    stack_i = []
    stack_K = []
    K = 0
    old_i = 0
    is_separate = False
    while(True):
        num = len(new_str)
        if num == 0:
            break
        for i in range(old_i, num):
            s = new_str[0:i+1]
            if s == prev:
                is_separate = False
                continue
            else:
                # 分岐前に状態保存
                #stack_str.append(new_str)
                stack_start.append(num_in_str - len(new_str))
                stack_i.append(i+1)
                stack_K.append(K)

                new_str = new_str[i+1:]

                prev = s
                K += 1
                is_separate = True
                break
        # 失敗したらスタックからもとに戻す
        if is_separate == False:
            #new_str = stack_str.pop()
            start = stack_start.pop()
            new_str = in_str[start:]
            old_i = stack_i.pop()
            K = stack_K.pop()
        else:
            old_i = 0

    return K

s = input()
#s="aabbaa"
#s="aaaccacabaldkfjadhjdhafidhkajhdkfjahdskjhfakhdkfaababc"*1000
#num = func( s, "")
num = func( s )

print(num)
N,M = map(int, input().split())

a = [int(input()) for i in range(M)]

if(N >= sum(a)):
    print(N - sum(a))
else:
    print(-1)

### FIXED CODE ###

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

a = [int(M) for M in input().split()]

if(N >= sum(a)):
    print(N - sum(a))
else:
    print(-1)
#!/usr/bin/env python
# coding: utf-8

# In[16]:


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


# In[23]:


max(A)
cnt


# In[41]:


cnt = 0
low = 0
high = max(A)
ans = max(A)
old = int(high)
mycount = 0
while low < high:
    mid = (high+low)/2
    cnt = sum([(x-0.001)//mid for x in A])
    if cnt <= K:
        high = mid
        ans = min(ans, int(-(-mid//1)))
    else:
        low = mid
    if int(mid) == old:
        mycount += 1
    if mycount == 100:
        break
    old = int(mid)
print(ans)


# In[ ]:






### FIXED CODE ###

#!/usr/bin/env python
# coding: utf-8

# In[16]:


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


# In[49]:


low = 0
high = max(A)
def ok(x):
    cnt = 0
    for a in A:
        cnt += (a//x)
        if a%x == 0:
            cnt -= 1
    return cnt <= K
 
while high-low > 1:
    mid = (high+low)//2
    if ok(mid):
        high = mid
    else:
        low = mid
print(high)


# In[ ]:
s = input()

if((s[3]==s[4]) and (s[5]==s[6])):
  	print("Yes")
else:
	print("No")


### FIXED CODE ###

s = input()

if((s[2]==s[3]) and (s[4]==s[5])):
  	print("Yes")
else:
	print("No")
import numpy as np

n, d = map(int, input().split())
x = np.array([[int(i) for i in input().split()] for _ in range(n)])

c = [1 if np.linalg.norm(x[i]-x[i-1]).is_integer() else 0 for i in range(len(x)) ]
print(sum(c))

### FIXED CODE ###

import numpy as np

n, _ = map(int, input().split())
x = np.array([[int(i) for i in input().split()] for _ in range(n)])

c = [1 if np.linalg.norm(x[i]-x[j]).is_integer() else 0 for i in range(1, len(x)) for j in range(i)]
print(sum(c))
prirt(int(input())^int(input()))


### FIXED CODE ###

n = int(input())
m = int(input())
print((5 - n -m)%3 + 1)
N = int(input())
print(N*N*N)

### FIXED CODE ###

N = input()
if N == 'Rainy':
 print('Sunny')
elif N == 'Sunny':
 print('Cloudy')
elif N == 'Cloudy':
  print('Rainy')
s=str(input())
count=0
for i in range(s):
  if s[i]=='+':
    count+=1;
  else:
    count-=1
print(count)


### FIXED CODE ###

s=str(input())
count=0
for i in range(4):
  if s[i]=='+':
    count+=1;
  else:
    count-=1
print(count)
from math import *
import sys

N = int(input())
all_input_list = [list(map(int, input().split())) for i in range(N)]
x, y, h = [all_input_list[i] for i in range(N) if all_input_list[i][2] > 0][0]
for cx in range(101):
    for cy in range(101):
        H = h + abs(cx - x) + abs(cy - y)
        for input_list in all_input_list:
            if (input_list[2] != (H - abs(cx - input_list[0]) - abs(cy - input_list[1])):
                break
        else:
            print("%s %s %s" % (cx, cy, H))
            sys.exit(0)


### FIXED CODE ###

print("Hello World") if(input() == "1") else print(int(input()) + int(input()))
N, K, X, Y = list(map(int, input().split()))
if N >= K:
    res = K * X + (N-K) * Y
else: 
    res = N * X
print(res)

### FIXED CODE ###

n, k, x, y = (int(input()) for _ in range(4)) 
if n >= k:
    res = k * x + (n-k) * y
else: 
    res = n * x
print(res)
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    A,B = inputMap()
    
    tmp = A+B
    
    if tmp < 11:
        print(tmp)
    else:
        print("error")
    
        
if __name__ == "__main__":
	main()


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    S = list(input())
    
    tmp = {}
    for i in S:
        if i in tmp:
            print("no")
            sys.exit()
        else:
            tmp[i] = 1
            
    print("yes")
        
if __name__ == "__main__":
	main()
n, m = list(map(int, input().split()))
a = []
for i in range(m):
	a.append(int(input())
mod = 1000000007

memo = [0]*(n+1)
memo[0] = 1


for i in range(1, n+1):
    memo[i] = memo[i-1] + memo[i-2]
    if i in a:
        memo[i] = 0

print(memo[-1]%mod)

### FIXED CODE ###

n, m = list(map(int, input().split()))
a = []
for i in range(m):
    a.append(int(input()))

mod = 1000000007

memo = [-1]*(n+1)
memo[0] = 0

for k in range(m):
    memo[a[k]] = 0

for i in range(1, n+1):
    if memo[i] != -1:
        pass 
    elif i <= 2:
        memo[i] = memo[i-1] + 1
    else:
        memo[i] = memo[i-1] + memo[i-2]
print(memo[-1]%mod)
w,h,n=map(int,input().split())
x=y=0
for i in range(n):
  xi,yi,a=map(int,input().split())
  if a==1:
    x=max(x,xi)
  elif a==2:
    w=min(W,xi)
  elif a==3:
    y=max(y,yi)
  elif a==4:
    h=min(H,yi)    
print(0 if x>=w or y>=h else (w-x)*(h-y))


### FIXED CODE ###

w,h,n=map(int,input().split())
x=y=0
for i in range(n):
  xi,yi,a=map(int,input().split())
  if a==1:
    x=max(x,xi)
  elif a==2:
    w=min(w,xi)
  elif a==3:
    y=max(y,yi)
  elif a==4:
    h=min(h,yi)    
print(0 if x>=w or y>=h else (w-x)*(h-y))
n = int(raw_input())
num_list = [int(raw_input()) for i in xrange(n)]
#print num_list

ans = 1 - pow(10, 9)
chk = num_list[0]

for i in range(1, n):
  if num_list[i] >= chk:
    continue
  max_num = max(num_list[i+1:])
  tmp = max_num - num_list[i]
  if tmp > ans:
    ans = tmp

print ans

### FIXED CODE ###

n = int(raw_input())
num_list = [int(raw_input()) for i in xrange(n)]

minv = num_list[0]
maxv = -1000000000

for i in xrange(1, n):
  tmp = num_list[i] - minv
  maxv = tmp if tmp > maxv else maxv
  minv = num_list[i] if minv > num_list[i] else minv
  # print "i = %d, tmp = %d, maxv = %d, minv = %d" % (i, tmp, maxv, minv)

print maxv