Harryxun/stf_run huggingface dataset:
from bisect import *
from collections import *
from fractions import gcd
from math import factorial
r1,c1,r2,c2=map(int,input().split())
mod=10**9+7
A=2*(10**6)+100
P=[0 for i in range(A+1)]

P[1]=1
for i in range(2,A):
    P[i]=P[i-1]*i%mod


def comb(x,y):
    if y>x or x<=0:
        return(0)
    elif y==0:
        return(1)
    else:
        return(P[x]*pow(gP[x-y],mod-2,mod)%mod*pow(gP[y],mod-2,mod)%mod)

count=0
for i in range(c1+1,c2+1 +1):
    count=(count+comb(i+r2,r2)-comb(i+r1-1,r1-1))%mod
print(count%mod)


### FIXED CODE ###

r1,c1,r2,c2=map(int,input().split())
mod=10**9+7
A=2*(10**6)+3
P=[0 for i in range(A+1)]
P[1]=1
for i in range(2,A):
    P[i]=P[i-1]*i%mod

dr2=pow(P[r2],mod-2,mod)
dr1=pow(P[r1-1],mod-2,mod)
def combr2(x):
    y=r2
    if y>x or x<=0:
        return(0)
    elif y==0:
        return(1)
    else:
        return(P[x]*pow(P[x-y],mod-2,mod)%mod*dr2%mod)

def combr1(x):
    y=r1-1
    if y>x or x<=0:
        return(0)
    elif y==0:
        return(1)
    else:
        return(P[x]*pow(P[x-y],mod-2,mod)%mod*dr1%mod)
count=0
for i in range(c1+1,c2+2):
    count=(count+combr2(i+r2)-combr1(i+r1-1))%mod
print(count%mod)
import sys, math
from collections import deque

readline = sys.stdin.readline

S = int(readline())

M = 10 ** 9
rS = math.ceil(math.sqrt(S))

while True:
    rem = rS ** 2 - S


    if rem <= M:
        b = rem
        break
    else:
        b = 0
        a = 2
        c = math.floor(rem ** 0.5)
        while a < c:
            if rem % a == 0:
                b = a
                break
            a += 1
        if b != 0:
            break
    
    if rS == M:
        rS -= 50
    else:
        rS += 1

print('0 0 {} {} {} {}'.format(rS, b, rem // b, rS))

### FIXED CODE ###

import sys, math
from collections import deque

readline = sys.stdin.readline

S = int(readline())

M = 10 ** 9
rS = math.ceil(math.sqrt(S))

while True:
    rem = rS ** 2 - S

    if rem == 0:
        print('0 0 {} {} {} {}'.format(rS, 0, 0, rS))
        exit(0)

    if rem <= M:
        b = rem
        break
    else:
        b = 0
        a = rem // M + 1
        c = math.floor(rem ** 0.5)
        while a < c and a < M:
            if rem % a == 0:
                b = a
                break
            a += 1
        if b != 0:
            break
    
    if rS >= M:
        rS = M - 1000
    else:
        rS += 1


print('0 0 {} {} {} {}'.format(rS, b, rem // b, rS))
import math
a,b=[int(i) for i in input().split()]
def lcm(x,y):
    return int((x*y) / math.gcd(x,y))

  
  
z=lcm(a,b) 
print(z)

### FIXED CODE ###

A, B=[int(i) for i in input().split()]

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(a, b):
	return a * b // gcd (a, b)
  
print(lcm(A,B))
a,b=map(int, input().input())
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")
n, m = map(int, input().split())
if m <= 2*n:
  print(m//2)
else:
  print((m-2n)//3 + n)

### FIXED CODE ###

n, m = map(int, input().split())
if m <= 2*n:
  print(m//2)
else:
  print((m-2*n)//4 + n)
from collections import defaultdict, deque

n, m = [int(i) for i in raw_input().split()]

# children = defaultdict(list)
parents = defaultdict(list)

for _ in range(m):
    u, v = [int(i) for i in raw_input().split()]
    # children[u-1].append(v-1)
    parents[v-1].append(u-1)

def longest_path(parents, n):
    f = [None] * n
    # targets = [x for y in children.values() for x in y]
    # starts = [v for v in range(n) if v not in targets]

    # print f
    for i in range(n):
        get_f(parents, f, i)

    # print f
    return max(f)

def get_f(parents, f, i):
    if f[i] != None:
        return f[i]

    for v in parents[i]:
        f[i] = max(f[i], get_f(parents, f, v) + 1)

    return f[i]

# def longest_path(children, parents, n):
#     targets = [x for y in children.values() for x in y]
#     starts = [v for v in range(n) if v not in targets]
#     f = [None] * n
    
#     Q = deque([])
#     for v in starts:
#         f[v] = 0
#         Q.append((v, 0))

#     output = 0
#     while len(Q) > 0:
#         node, length = Q.pop()
#         output = max(output, length)
#         for v in children[node]:
#             Q.append((v, length+1))

#     return output

print(longest_path(parents, n))


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(1000000)

n, m = [int(i) for i in raw_input().split()]
parents = defaultdict(list)

i = 0
while i < m:
    u, v = [int(x) for x in raw_input().split()]
    parents[v-1].append(u-1)
    i += 1

def calc_f(parents, f, i):
    if i < 0 or i >= len(f):
        return 0

    if f[i] != -1:
        return f[i]

    f[i] = 0
    for v in parents[i]:
        f[i] = max(f[i], calc_f(parents, f, v)+1)

    return f[i]

f = [-1] * n
j = 0
while j < n:
    calc_f(parents, f, j)
    j += 1

if len(f) == 0:
    print 0
else:
    print max(f)
s = input().split(" ")
n = int(s[0])
k = int(s[1])
sp = input().split(" ")
p = [int(pstr) for pstr in sp]
num = n - k

for i in range(k - 1):
    if p[i] > p[i + 1]:
        num += 1
        break

for i in range(n - k - 1):
    for j in range(k - 1):
        if p[i] > p[i + j + 1]:
            num -= 1
        elif p[i + k] < p[i + j + 1]







print(num)


### FIXED CODE ###

class MinSlideWindow:
    def __init__(self,p):
        self.pos_list = []
        self.val_list = p
        self.start_idx = 0

    def put(self,pos):
        val = self.val_list[pos]

        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[-1]
            val1 = self.val_list[pos1]
            if val1 >= val:
                del self.pos_list[-1]
            else:
                break
        self.pos_list.append(pos)

    def get(self,pos):
        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[self.start_idx]
            if pos1 <= pos:
                self.start_idx += 1
            else:
                break

    def min(self):
        pos1 = self.pos_list[self.start_idx]
        val1 = self.val_list[pos1]
        return val1

class MaxSlideWindow:
    def __init__(self,p):
        self.pos_list = []
        self.val_list = p
        self.start_idx = 0
        
    def put(self,pos):
        val = self.val_list[pos]

        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[-1]
            val1 = self.val_list[pos1]
            if val1 <= val:
                del self.pos_list[-1]
            else:
                break
        self.pos_list.append(pos)

    def get(self,pos):
        while len(self.pos_list) > self.start_idx:
            pos1 = self.pos_list[self.start_idx]
            if pos1 <= pos:
                del self.pos_list[self.start_idx]
            else:
                break

    def max(self):
        pos1 = self.pos_list[self.start_idx]
        val1 = self.val_list[pos1]
        return val1




s = input().split(" ")
n = int(s[0])
k = int(s[1])
sp = input().split(" ")
p = [int(pstr) for pstr in sp]
num = 1
ident = True
rv_pos = -1

minw = MinSlideWindow(p)
maxw = MaxSlideWindow(p)

for i in range(k - 1):
    if p[i] > p[i + 1]:
        rv_pos = i
        ident = False
    
for i in range(k-1):
    minw.put(i)
    maxw.put(i)

for i in range(1,n - k + 1):
    
    maxw.put(i + k - 2)
    minw.put(i + k - 2)
    maxw.get(i-1)
    minw.get(i-1)

    """    
    for j in range(k - 1):
        if p[i + j] > p[i + j +1]:
            break
    else:
        if not ident:
            ident = True
            num += 1
        continue
    """
    if p[i + k - 2] > p[i + k - 1]:
        rv_pos = i + k - 2
        

    
    if rv_pos < i:
        if not ident:
            ident = True
            num += 1
        continue
            

    if p[i - 1] > minw.min() or p[i + k - 1] < maxw.max():
        num += 1

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

ans = n
all = [n]
m = abs(n - k)

if n == 0 or n == 1 or k == 1 or n == 2*k or k == 2*n:
  ans = 0
else:
  all = []
  for _ in range(m):
    n = abs(n - k)
    all.append(n)

  
print(min(ans, min(all)))

### FIXED CODE ###

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

rot = n//k
x = n

if k == 1 or n == k or n%k == 0:
  x = 0
elif rot >= 1:
  x = n - k*rot
  
t = x%k

print(min(t, abs(t-k)))
A,B = map(int,input().split())

sumc = 0
ans = 0
for count in range(1,22):
    sumc = A * count 
    if sumc-count + 1 >= B:
        ans = count 
        break
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
sumc = 0

for count in range(N-1):
    if A[count+1] - A[count] == 1:
        sumc = sumc + C[A[count]-1]

print(sumc + sum(B))
while True:
	c1, c2, c3 = list(map(int,input().split()))
	deck = [i for i in range(1,11) if i != c1 and i != c2 and i != c3]
	if 20 - c1 - c2 > max(deck) or 20 - c1 - c2 == c3:
		print("YES")
	else:
		print("NO")


### FIXED CODE ###

while True:
	try: c1, c2, c3 = list(map(int,input().split()))
	except: break
	safe = 20 - (c1 + c2)
	deck = [i for i in range(1,11) if i <= safe and i != c1 and i != c2 and i != c3]
	print(["YES","NO"][len(deck) / 7 <= 0.5])
def search(lst, x, al, A, tmp, key):

    for p in lst:
        if p in tmp:
            for v in tmp[p]:
                A[v] += x
        else:
            A[p] += x
            tmp[key].add(p)
            search(al[p], x, al, A, tmp, key)

N, Q = [int(i) for i in input().split()]

al = [[] * N for _ in range(N)]
tmp = {}
A = [0] * N


for _ in range(N - 1):
    a, b = [int(i) - 1 for i in input().split()]
    al[a].append(b)
    
for i in range(Q):
    p, x = [int(i) - 1 for i in input().split()]
    if p in tmp:
        for v in tmp[p]:
            A[v] += x + 1
            continue
    else:
        A[p] += (x + 1)
        tmp[p] = {p}
        search(al[p], x + 1, al, A, tmp, p)

print(*A, sep=' ')

### FIXED CODE ###

import sys

sys.setrecursionlimit(10**6) #再帰の回数制限を増やす
input = sys.stdin.readline


def add_num(i, total, parent=-1):
    """隣接リストを取り出して深さ優先探索
    自分より上層の total のカウント数と部分木の頂点としてのカウント数を足す"""
    for p in adj[i]:
        if p != parent:
            ans_lst[p] = total + tmp[p]
            add_num(p, total + tmp[p], i)
    return
    
    
N, Q = [int(i) for i in input().split()]

adj = [[] for _ in range(N)] # 隣接リスト
tmp = [0] * N # 部分木の根としてのカウント数 
ans_lst = [0] * N # 答えのリスト

# 隣接リストの作成
for _ in range(N - 1):
    a, b = [int(i) - 1 for i in input().split()]
    adj[a].append(b)
    adj[b].append(a)

# ｔｍｐリストの作成
for _ in range(Q):
    p, x = [int(i) for i in input().split()]
    tmp[p-1] += x

ans_lst[0] = tmp[0]
total = tmp[0]
add_num(0, total)

print(*ans_lst, sep=' ')
A, B, C = map(int, input().split())
K = int(input())
flag = False

l=[]
for i in range(K):
  for j in range(K):
    for k in range(K):
      if i+j+k == K:
        m=[i+1, j+1, k+1]
        l.append(m)

for i in range(len(l)):
  m = l[i]
  a=A*(2**m[0])
  b=B*(2**m[1])
  c=C*(2**m[k])

  if a<b and b<c:
    flag = False
    print("Yes")
    break
  else:
    flag = True
if flag:
  print("No")

### FIXED CODE ###

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

l=[]
for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      if i+j+k == K:
        m=[i, j, k]
        l.append(m)

for i in range(len(l)):
  m = l[i]
  a=A*(2**m[0])
  b=B*(2**m[1])
  c=C*(2**m[2])

  if a<b and b<c:
    flag = False
    print("Yes")
    break
  else:
    flag = True
if flag:
  print("No")
#query=10**4*2
#alph=26
#insert=500000
#O(|insert*query*alph|)?
def main():
	import bisect,sys
	input=sys.stdin.readline
	n=int(input())
	s=list(input().rstrip())
	q=int(input())
	word=[[]for _ in range(26)]
	for i,j in enumerate(s):
		ch=ord(j)-ord("a")
		word[ch].append(i)
	for _ in range(q):
		query=input().split()
		if query[0]=="1":
			i,x=int(query[1])-1,ord(query[2])-ord("a")
			old=ord(s[i])-ord("a")
			word[old].remove(i)
			new=bisect.bisect_left(word[x],i)
			word[x].insert(new,i)
			s[i]=x
		# else:
		# 	l,r=int(query[1])-1,int(query[2])-1
		# 	kind=0
		# 	for i in range(26):
		# 		l=bisect.bisect_left(word[i],l)
		# 		if l==len(word[i]):
		# 			continue
		# 		if word[i][l]<=r:
		# 			kind+=1
		# 	print(kind)
if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys
input=sys.stdin.readline
n=int(input())
BIT=[[0]*n for i in range(26)]
w=[ord(x)-ord("a") for x in input()]
for i in range(n):
	k=i+1
	while k<=n:
		BIT[w[i]][k-1]+=1
		k=k+(k&-k)
q=int(input())
for i in range(q):
	a,b,c=input().split()
	if a=="1":
		k=int(b)
		while k<=n:
			BIT[ord(c)-ord("a")][k-1]+=1
			k=k+(k&-k)
		k=int(b)
		while k<=n:
			BIT[w[int(b)-1]][k-1]-=1
			k=k+(k&-k)	
		w[int(b)-1]=ord(c)-ord("a")
	else:
		b=int(b);c=int(c)
		ans=0
		for i in range(26):
			cnt=0
			k=c
			while k!=0:
				cnt+=BIT[i][k-1]
				k=k-(k&-k)
			k=b-1
			while k!=0:
				cnt-=BIT[i][k-1]
				k=k-(k&-k)
			if cnt>0:
				ans+=1
		print(ans)
n = int(input())

l = []
for _ in range(100):
    x = _**5
    if x > 10**12:
        break
    else:
        l.append(x)
tmp = len(l)

for i in range(len(l)):
    l.append(l[i]*-1)
#print(l)
#print(len(l))

from itertools import combinations
y = (list(combinations(l, 2)))
#print(y)

for j in range(len(y)):
    if y[j][0] - y[j][1] == n:
        z = j
        break
#print(y[z])

if y[z][0] >= 0:
    a = l.index(y[z][0])
else:
    a = -1 * (l.index(y[z][0]*-1))

if y[z][1] >= 0:
    b = l.index(y[z][1])
else:
    b = -1 * (l.index(y[z][1]*-1))

print(a, b)        


### FIXED CODE ###

# +の場合
i = 0
ans = 0
while ans <= 1000000000:
   i += 1
   ans = i**5 - (i-1)**5
# i: 120

# -の場合
i = 0
ans = 0
while ans <= 1000000000:
   i -= 1
   ans = i**5 - (i-1)**5 
# i: -119

n = int(input())
l = [_**5 for _ in range(120)]

for i in range(1,120):
    for j in range(120):
        if l[i] - l[j] == n:
            print(int(l[i]**0.2), int(l[j]**0.2))
            exit()
        if l[i] + l[j] == n:
            print(int(l[i]**0.2), int(-1*l[j]**0.2))
            exit()
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;


int main(void) {
    int n;
    cin >> n;

    auto a = vector<int>(n);
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    
    int cnt = 0;
    auto flags = vector<bool>(n, true);

    for (int i = 0; i < n; i++)
    {
        if (!flags[i])
        {
            continue;
        }
        
        if (i == n - 1 || a[i] != a[i + 1])
        {
            cnt += 1;
        }
        
        for (int j = i + 1; j < n; j++)
        {
            if (flags[j] && a[j] % a[i] == 0)
            {
                flags[j] = false;
            }
        }
    }
    
    cout << cnt << endl;
    
    return 0;
}


### FIXED CODE ###

from collections import Counter


n = int(input())
a = list(map(int, input().split()))
a.sort()
c = Counter(a)

flags = [True] * (a[-1] + 1)

for e in a:
    for mul in range(2, a[-1] // e + 1):
        flags[e * mul] = False

print(sum([flags[a[i]] and c[a[i]] == 1 for i in range(n)]))
x,a,b=[int(input()) for i range(3)]
c=x-a
print(c%b)

### FIXED CODE ###

x,a,b=[int(input()) for i in range(3)]
c=x-a
print(c%b)
import mathpy as math
a,b = input().split(" ")
ab = int(a+b)
if math.sqrt(ab) = int(np.sqrt(ab)):
  print("Yes")
else:
  print("No")


### FIXED CODE ###

a,b = input().split(" ")
ab = int(a+b)
for i in range(1,400):
  if i**2 == ab:
    print("Yes")
    exit()
print("No")
import itertools

n=int(input())
a=list(int(input()) for i in range(n))
b=[]
a.sort()

ans=0

if n%2==1:
    b.append(a[n//2])
    for i in range(n//2):
        if a[n//2]-a[0]<=a[-1]- a[n//2]:
            b.append(a[-(i+1)])
            b.append(a[i])
        else:
            b.append(a[i])
            b.append(a[-(i+1)])
            
        
    for i in range(len(b)-1):
        ans+=abs(b[i+1]-b[i])
    print(ans)


else:
    b.append(a[n//2-1])
    b.append(a[n//2+1])
    
    if n==2:
        print(b[1]-b[0])
        exit()
    
    for i in range(n//2-2):
        b.append(a[i])
        b.append(a[-(i+1)])
    
    b.append(a[n//2-2])
    b.append(a[n//2])
    
    for i in range(len(b)-1):
        ans+=abs(b[i+1]-b[i])
    print(ans)
        
        
        
        
        




### FIXED CODE ###

import itertools

n=int(input())
a=list(int(input()) for i in range(n))
b=[]
a.sort()
ans=0

if n%2==1:
    x=2*sum(a[n//2+1:])-2*sum(a[:n//2+1])+sum(a[n//2-1:n//2+1])
    y=2*sum(a[n//2:])-sum(a[n//2:n//2+2])-2*sum(a[:n//2])
    print(max(x,y))

else:
    x=2*sum(a[n//2:])-(a[n//2]) -2*sum(a[:n//2])+a[n//2-1]
    print(x)
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N, X, M = [int(x) for x in input().split()]

    x = {}

    ruiseki = [0] * (M + 1)

    cnt = 1
    ans = X
    c = X
    ruiseki[1] = ans
    while cnt < N:
        next = c ** 2 % M
        if next in x.keys():
            y = x[next]
            # print(ruiseki)
            # print(cnt, y)
            loop = ruiseki[cnt] - ruiseki[y - 1]
            loopcnt = cnt - y + 1
            ans += ((N - cnt) // loopcnt) * loop
            # print(ans)
            amari = (N - cnt) % loopcnt
            # print(amari, loop, loopcnt)
            if amari != 0:
                ans += ruiseki[y - 1 + amari] - ruiseki[y - 1]
                # print(ans)
            break

        ans += next
        cnt += 1
        ruiseki[cnt] = next
        ruiseki[cnt] += ruiseki[cnt - 1]
        c = next
        x[next] = cnt

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N, X, M = [int(x) for x in input().split()]

    x = {}

    ruiseki = [0] * (M + 1)

    cnt = 1
    ans = X
    c = X
    ruiseki[1] = ans
    while cnt < N:
        if c == 0:
            print(ans)
            return
        next = c ** 2 % M
        if next in x.keys():
            y = x[next]
            # print(ruiseki)
            # print(cnt, y)
            if N == cnt:
                print(ans + next)
                return
            loop = ruiseki[cnt] - ruiseki[y - 1]
            loopcnt = cnt - y + 1
            ans += ((N - cnt) // loopcnt) * loop
            # print(ans)
            amari = (N - cnt) % loopcnt
            # print(amari, loop, loopcnt)
            if amari != 0:
                ans += ruiseki[y - 1 + amari] - ruiseki[y - 1]
                # print(ans)
            break

        ans += next
        cnt += 1
        ruiseki[cnt] = next
        ruiseki[cnt] += ruiseki[cnt - 1]
        c = next
        x[next] = cnt

    print(ans)


if __name__ == '__main__':
    main()
# coding: utf-8
def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def main():
    n = get_ln_int_inputs()[0]
    a = get_ln_int_inputs()

    ilist = []

    t = n
    while t > 0:
        ilist.append(t)
        t -= 2
    t += 1
    while t < n:
        ilist.append(t)
        t += 2
    
    print(" ".join(str(a[i - 1]) for i in ilist))


main()

### FIXED CODE ###

# coding: utf-8
def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def main():
    p = get_ln_int_inputs()
    print(sum(p) - max(p))


main()
rating = int(input())
switch(rating):
  case rating>0 and rating < 1200:
    print("ABC")
    break
  case rating > 1200 and rating < 2800:
    print("ARC")
    break
  case rating > 2800 :
    print("AGC")
    break
  default:
    print("ERROR")
    break


### FIXED CODE ###

rating = int(input())
if(rating>=0 and rating<1200):
  print("ABC")
elif(rating < 2800):
  print("ARC")
elif(rating <= 4208):
  print("AGC")
import string

S = input()
alphabetsStr = string.ascii_lowercase
alphabets = list(map(lambda x: x, string.ascii_lowercase))
lastWord = ''.join(alphabets[::-1])

if len(S) == 26:
    if S == lastWord: print(-1)
    else:
        for i  in S:
            if alphabets[i] != S[i]:
                print(S[:i] + alphabets[i])
                break
else:
    for s in alphabets:
        if s not in S:
            print(S + s)
            break

### FIXED CODE ###

import string

S = input()
reversedS = ''.join(list(S)[::-1])
alphabets = list(string.ascii_lowercase)
lastWord = ''.join(alphabets[::-1])
cnt = [S.count(chr(ord('a')+i)) for i in range(26)]
if len(S) == 26:
    if S == lastWord: print(-1)
    else:
        found = False
        for i in range(len(reversedS)):
            s = reversedS[i]
            largeS = alphabets[ord(s)-ord('a')+1:]
            tailS = list(S)[26-i-1:]
            for lS in largeS:
                if lS in tailS:
                    print(S[:26-i-1]+lS)
                    found = True
                    break
            if found: break
else:
    for j in range(26):
        if cnt[j] == 0:
            S += chr(ord('a')+j)
            print(S)
            break
a, b, c = input().split()
a = int(a)
b = int(b)
c = int(c)

if a < b:
    if b < c:
        print('Yes')
else
    print('No')
    
    


### FIXED CODE ###

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

if a < b and b < c:
    print('Yes')
else:
    print('No')
sum_ = 0
temp = 0
for i in range(len(a)-1):
    temp += a[-i-1]
    sum_ += temp * a[-i-2]

print(sum_%(10**9 + 7))

### FIXED CODE ###

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

sum_ = 0
temp = 0
for i in range(len(a)-1):
    temp += a[-i-1]
    sum_ += temp * a[-i-2]

print(sum_%(10**9 + 7))
x = list(map(int,input().split()))
for i in x:
  if x[i] == 0:
    print(i+1)
    

### FIXED CODE ###

x = list(map(int,input().split()))
for i in range(len(x)):
  if x[i] == 0:
    print(i + 1)
n = int(input())
li = list(map(int,input().split()))
x = 0 #まだ未定なら0、単調増加なら1、単調減少なら-1にする
i = 0 #index
ans = 0

while True:
    if x == 0:
        if li[i] < li[i+1]:
            x = 1
        elif li[i] > li[i+1]:
            x = -1
        else:
            x = 0
    if x == 1:
        if li[i] > li[i+1]:
            ans += 1
            x = 0
    if x == -1:
        if li[i] < li[i+1]:
            ans += 1
            x = 0
    i += 1
    if i == n-1:
        break

print(ans+1)

### FIXED CODE ###

n = int(input())
li = list(map(int,input().split()))
x = 0 #まだ未定なら0、単調増加なら1、単調減少なら-1にする
i = 0 #index
ans = 0

if n == 1:
    print(1)
    exit()

while True:
    if x == 0:
        if li[i] < li[i+1]:
            x = 1
        elif li[i] > li[i+1]:
            x = -1
        else:
            x = 0
    if x == 1:
        if li[i] > li[i+1]:
            ans += 1
            x = 0
    if x == -1:
        if li[i] < li[i+1]:
            ans += 1
            x = 0
    i += 1
    if i == n-1:
        break
print(ans+1)
a=[]
while True:
 n = input()
 if n == 0:
  break
 a.append(n)
for i in range(len(a))
 print(f'Case {i+1}: {a[i]}')

### FIXED CODE ###

import sys
i=1
for e in sys.stdin:
 if'0\n'==e:break
 print(f'Case {i}: {e[:-1]}');i+=1
l = ["Sunny", "Cloudy", "Rainy"]

s = input()

ind = 0
for t in  l:
  if s = t:
    break
  ind += 1
ind %= 2
print(l[ind])

### FIXED CODE ###

l = ["Sunny", "Cloudy", "Rainy"]

s = input()

ind = 0
for t in  l:
  ind += 1
  if s == t:
    break
ind %= 3
print(l[ind])
n,t = map(int,input().split())
T = list(map(int,input().split()))
U = []
for i in range(n):
  for j in range(t):
    a = T[i] + t+1
    U.append(a)
setT = set(T)
setU = set(U)
ans = set(T)|set(U)

print(ans.count())

### FIXED CODE ###

n, T = map(int, input().split())
t = list(map(int, input().split()))
ans = T
for i in range(1, n):
    ans += min(t[i] - t[i - 1], T)
print(ans)
import fractions
n=int(input())
a=list(map(int, input().split()))
ans = a[0]
for i in range(1, n):
    ans = fractions.gcd(ans, a[i])
print(ans)

### FIXED CODE ###

n=int(input())
z=[list(map(int, input().split())) for i in range(n)]
z.sort(key=lambda x:x[2])
z.reverse()

v=[]
count=0

#各頂点に対して、中心座標と仮定して検証
for i in range(101):
    for j in range(101):
        x=abs(j-z[0][0])
        y=abs(i-z[0][1])
        h=z[0][2]+abs(x)+abs(y)
                
            #候補があってるか確認
        for k in range(n):
            if z[k][2]==max(h-abs(z[k][0]-j)-abs(z[k][1]-i),0):
                count+=1
                
        if count==n:
            print(j,i,h)
            exit()
        count=0