Harryxun/stf_run huggingface dataset:
a,b,c,d = map(int,input().split())
ans = "No"
while True:
  c -= b if c <= 0
    ans = "Yes" break
  a -= d if a <= 0 break
print(ans)

### FIXED CODE ###

a,b,c,d = map(int,input().split())
ans = "No"
while True:
  c -= b 
  if c <= 0:
    ans = "Yes"
    break
  a -= d 
  if a <= 0:
    break
print(ans)
n = int(input())
print(n , count("1"))

### FIXED CODE ###

print(input().count("1"))
A , B =map9int,input().split())
print(A*B)

### FIXED CODE ###

A , B =map(int,input().split())
print(A*B)
n = int(input())
a = list(map(int, input().split()))
a2 = a.copy()

ans1 = 0 #偶数インデックスが正
for i in range(n):
    s1 = sum(a[:i+1])
    if i % 2 == 0:
        if s1 <= 0:
            x = abs(s1) + 1
            ans1 += x
            a[i] += x
        else:
            continue
    else:
        if s1 >= 0:
            x = abs(s1) + 1
            ans1 += x
            a[i] -= x
ans2 = 0 #偶数インデックスが負
for i in range(n):
    s2 = sum(a2[:i+1])
    if i % 2 == 1:
        if s2 <= 0:
            x = abs(s2) + 1
            ans2 += x
            a2[i] += x
        else:
            continue
    else:
        if s2 >= 0:
            x = abs(s2) + 1
            ans2 += x
            a2[i] -= x

print(min(ans1, ans2))

### FIXED CODE ###

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

def f(a, sgn):
    cnt = 0
    s = 0
    for i in range(n):
        s += a[i]
        sgn *= (-1) #判定する符号は交互に変わる
        if s * sgn <= 0: #sgn一致しなければその積は負
            x = s + sgn*(-1)
            s -= x
            cnt += abs(x)
        
    return cnt
ans = min(f(a, 1), f(a, -1))
print(ans)
x = imput().split()
y = int(x[0])*int(x[1])
if y%2 = 1:
  print("Odd")
else:
  print("Even")

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
  print("Odd")
else:
  print("Even")
N = int(input())
c = input().strip()
r = c.count("R")
ans = 0
for i in range(r):
    if c[i] == "W":
        ans += 1
print(ans)


### FIXED CODE ###

N = int(input())
c = input().strip()
r = c.count("R")
ans = 0
for i in range(r):
    if c[i] == "W":
        ans += 1
print(ans)
import numpy as np

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

print(np.gcd.reduce(a))

### FIXED CODE ###

def gcd_core(a,b):
    if b == 0:
        return a
    else:
        return gcd_core(b,a%b)

def gcd(arr):
    g = gcd_core(arr[0],arr[1])
    for i in range(2,len(arr)):
        g = gcd_core(g,arr[i])
    return g

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

print(gcd(a))
import sys
H, W, M = map(int, input().split())
hList = {i+1: 0 for i in range(H)}
wList = {i+1: 0 for i in range(W)}
pList = set()
#print(hList, wList, pList)
for _ in range(M):
  h, w = list(map(int, input().split()))
  #print(h, w)
  hList[h] += 1
  wList[w] += 1
  pList.add((h, w))
#print(hList, wList, pList)

maxCount = max(hList.values())
maxHList = [h for h, count in hList.items() if count==maxCount]
if maxCount==0:
  print(0)
  sys.exit(0)

#h決め打ちでwを見る
for w in wList:
  

maxCount = max(wList.values())
maxWList = [w for w, count in wList.items() if count==maxCount]

#counterList = []
#for maxH in maxHList:
#  for maxW in maxWList:
#    counterList.append(hList[maxH] + wList[maxW] - (1 if ((maxH, maxW) in pList) else 0))
#print(max(counterList))
#print(max(((hList[maxH] + wList[maxW] - (1 if ((maxH, maxW) in pList) else 0)) for maxH in maxHList for maxW in maxWList)))
print(max(((hList[maxH] + wList[maxW] - (1 if ((maxH, maxW) in pList) else 0)) for maxH in maxHList for maxW in maxWList)))
for maxH, maxW in (maxH, maxW for maxH in maxHList for maxW in maxWList):
	if (maxH, maxW) in pList:
		print(hList[maxH] + wList[maxW] - 1)
		sys.exit(0)

print(hList[maxH] + wList[maxW])


### FIXED CODE ###

import sys
H, W, M = map(int, input().split())
hList = {i+1: 0 for i in range(H)}
wList = {i+1: 0 for i in range(W)}
pList = set()
#print(hList, wList, pList)
for _ in range(M):
  h, w = list(map(int, input().split()))
  #print(h, w)
  hList[h] += 1
  wList[w] += 1
  pList.add((h, w))
#print(hList, wList, pList)

maxHCount = max(hList.values())
maxHList = [h for h, count in hList.items() if count==maxHCount]


maxWCount = max(wList.values())
maxWList = [w for w, count in wList.items() if count==maxWCount]

#counterList = []
#for maxH in maxHList:
#  for maxW in maxWList:
#    counterList.append(hList[maxH] + wList[maxW] - (1 if ((maxH, maxW) in pList) else 0))
#print(max(counterList))
#print(max(((hList[maxH] + wList[maxW] - (1 if ((maxH, maxW) in pList) else 0)) for maxH in maxHList for maxW in maxWList)))
#print(max(((hList[maxH] + wList[maxW] - (1 if ((maxH, maxW) in pList) else 0)) for maxH in maxHList for maxW in maxWList)))

#if M < len(maxHList)*len(maxWList):
#	print(maxHCount + maxWCount)
#	sys.exit(0)

for maxH in maxHList:
  for maxW in maxWList:
    if (maxH, maxW) not in pList:
      print(maxHCount + maxWCount)
      sys.exit(0)

print(maxHCount + maxWCount - 1)
import sys
 
a,b,h=map(int,input().split())

square = (a + b) * h / 2

print(square)

### FIXED CODE ###

import sys

a,b,h=[int(input()) for i in range(3)]

square = (a + b) * h / 2

print(int(square))
#include <iostream>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;

template<class T>
struct BIT {
    int N;
    vector<T> data;
    BIT(int N) {
        data = vector<T>(N + 1);
        this->N = N;
    }

    void add_at(int idx, T val) {
        for (int i = idx + 1; i <= N; i += (i & (-i))) {
            data[i] += val;
        }
    }

    T sum_to(int idx) {
        T res = 0;
        for (int i = idx + 1; i > 0; i -= (i & (-i))) {
            res += data[i];
        }
        return res;
    }

    T sum_in(int l, int r) { // [l, r]
        return sum_to(r) - sum_to(l - 1);
    }
};

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int N, Q; 
    cin >> N >> Q;

    vector<int> C(N, -1);
    for (int i = 0; i < N; i++) {
        cin >> C[i];
    }

    vector<vector<tuple<int, int, int>>> queries(N);
    for (int i = 0; i < Q; i++) {
        int l, r;
        cin >> l >> r;
        l--; r--;
        queries[r].push_back(tuple<int, int, int>(l, r, i));
    }

    auto bit = BIT<int>(N);
    auto V = *max_element(C.begin(), C.end());
    auto last = vector<int>(V + 1, -1);
    auto ans = vector<int>(Q, -1);

    for (int i = 0; i < N; i++) {
        if (last[C[i]] != -1) {
            bit.add_at(last[C[i]], -1);
        }

        bit.add_at(i, +1);
        last[C[i]] = i;

        for (auto& [l, r, idx] : queries[i]) {
            ans[idx] = bit.sum_in(l, r);
        }
    }

    for (auto x: ans) {
        cout << x << endl;
    }

    return 0;
}

### FIXED CODE ###


class BIT:
    '''
    All methods use 0-based index while the implementation use 1-based index
    '''
    def __init__(self, N, val=0):
        self.data = [val] * (N + 1)
        self.N = N
    
    def add_at(self, idx, val):
        i = idx + 1
        while i <= self.N:
            self.data[i] += val
            i += i & (-i)
    
    def sum_to(self, idx):
        res = 0
        i = idx + 1
        while i > 0:
            res += self.data[i]
            i -= i & (-i)
        return res
    
    def sum_in(self, l, r): # [l, r]
        return self.sum_to(r) - self.sum_to(l - 1)
    
    
class Query:
    def __init__(self, i, l, r):
        self.i = i
        self.l = l
        self.r = r
    
    
N, Q = map(int, input().split())
C = list(map(int, input().split()))
    
queries = [[] for _ in range(N)]
for i in range(Q):
    l, r = map(int, input().split())
    l, r = l - 1, r - 1
    queries[r].append(Query(i, l, r))
    
bit = BIT(N)
last = [-1] * (max(C) + 1)
    
query_idx = 0
ans = [-1] * Q
for i, c in enumerate(C):
    if last[c] != -1:
        bit.add_at(last[c], -1)    
    bit.add_at(i, +1)
    last[c] = i
    
    for q in queries[i]:
        ans[q.i] = bit.sum_in(q.l, q.r)
    
print('\n'.join(map(str, ans)))
s = input()
g_cnt, p_cnt = 0, 0
ans = 0
for si in s:
    if si = "g":
        if p_cnt < g_cnt:
            p_cnt += 1
            ans += 1
        else:
            g_cnt += 1
            ans -= 1
    else:
        g_cnt += 1
        ans += 1
print(ans)


### FIXED CODE ###

s = input()
g_cnt, p_cnt = 0, 0
ans = 0
for si in s:
    if si == "g":
        if p_cnt < g_cnt:
            p_cnt += 1
            ans += 1
        else:
            g_cnt += 1
    else:
        if p_cnt < g_cnt:
            p_cnt += 1
        else:
            g_cnt += 1
            ans -= 1
print(ans)
n = int(input())
can = [[0] * 101 for _ in range(101)]


def solve(n, can):
    for k in range(n):
        x, y, h = map(int, input().split())
        if k == 0:
            for i in range(101):
                for j in range(101):
                    can[i][j] = h + abs(x - i) + abs(y - j)
        else:
            for i in range(101):
                for j in range(101):
                    if can[i][j] is None:
                        continue
                    if h + abs(x - i) + abs(y - j) != can[i][j]:
                        can[i][j] = None
    for i in range(101):
        for j in range(101):
            if can[i][j] is None:
                continue
            return i, j, can[i][j]


print(*solve(n, can))


### FIXED CODE ###

def solve(n):
    can = [[[-1, float('inf')] for _ in range(101)] for _ in range(101)]
    for k in range(n):
        x, y, h = map(int, input().split())
        for i in range(101):
            for j in range(101):
                if can[i][j] is None:
                    continue
                hh = h + abs(x - i) + abs(y - j)
                hl = 1 if h == 0 else hh
                nl, nh = max(can[i][j][0], hl), min(can[i][j][1], hh)
                if nl > nh:
                    can[i][j] = None
                else:
                    can[i][j][0] = nl
                    can[i][j][1] = nh

    for i in range(101):
        for j in range(101):
            if can[i][j] is None:
                continue
            return i, j, can[i][j][0]


n = int(input())
print(*solve(n))
# https://atcoder.jp/contests/abc074/tasks/arc083_a
# C - Sugar Water
import math
w_A, w_B, s_C, s_D, limit_E, max_F = list(map(int, input().split()))

# それ以上溶かすことができるか
# それ以上重量を増やせるか

# 取りうる水の組み合わせ
w_A_list = [w_A * x * 100 for x in range(math.floor(max_F / (w_A * 100)) + 1)]
w_B_list = [w_B * x * 100 for x in range(math.floor(max_F / (w_B * 100)) + 1)]

# 最悪で3000*3000
w_list = []
for a in w_A_list:
    for b in w_B_list:
        if a + b <= max_F:
            w_list.append(a + b)
w_list = list(set(w_list))  # 3000以下

# 取りうる水の組み合わせ
s_C_list = [s_C * x  for x in range(math.floor(max_F / s_C) + 1)]
s_D_list = [s_D * x  for x in range(math.floor(max_F / s_D) + 1)]

# 最悪で3000*3000
s_list = []
for c in s_C_list:
    for d in s_D_list:
        if c + d <= max_F:
            s_list.append(c + d)
s_list = list(set(s_list))  # 3000以下

max_d = 0
for w in w_list:
    for s in s_list:
        limit_s = w * limit_E / 100
        if w + s <= max_F and w + s != 0 and s <= limit_s:
            d = (s / (w + s)) * 100
            if d > max_d:
                max_d = d
                ans_ws, ans_s = w + s, s

ans = ' '.join([str(ans_ws), str(ans_s)])
print(ans)


### FIXED CODE ###

# https://atcoder.jp/contests/abc074/tasks/arc083_a
# C - Sugar Water
import math
w_A, w_B, s_C, s_D, limit_E, max_F = list(map(int, input().split()))

# それ以上溶かすことができるか
# それ以上重量を増やせるか

# 取りうる水の組み合わせ
w_A_list = [w_A * x * 100 for x in range(math.floor(max_F / (w_A * 100)) + 1)]
w_B_list = [w_B * x * 100 for x in range(math.floor(max_F / (w_B * 100)) + 1)]

# 最悪で3000*3000
w_list = []
for a in w_A_list:
    for b in w_B_list:
        if a + b <= max_F:
            w_list.append(a + b)
w_list = list(set(w_list))  # 3000以下

# 取りうる水の組み合わせ
s_C_list = [s_C * x  for x in range(math.floor(max_F / s_C) + 1)]
s_D_list = [s_D * x  for x in range(math.floor(max_F / s_D) + 1)]

# 最悪で3000*3000
s_list = []
for c in s_C_list:
    for d in s_D_list:
        if c + d <= max_F:
            s_list.append(c + d)
s_list = list(set(s_list))  # 3000以下

max_d = -float('inf')
for w in w_list:
    for s in s_list:
        limit_s = w * limit_E / 100
        if w + s <= max_F and w + s != 0 and s <= limit_s:
            d = (s / (w + s)) * 100
            if d > max_d:
                max_d = d
                ans_ws, ans_s = w + s, s

ans = ' '.join([str(ans_ws), str(ans_s)])
print(ans)
S = input()
T = input()

if S == T:
    print('Yes')
l = len(S)
L = list(S)
for i in range(l):
    a = L[0]
    del L[0]
    L.append(a)
    s = ''.join(L)
    if s == T:
        print('Yes')
        break
else:
    print('No')

### FIXED CODE ###

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

print(a[2]-a[0])
n = int(input())
a = sorted(list(map(int, input().split())))
b = sorted(list(map(int, input().split())))
c = sorted(list(map(int, input().split())))

bc = []
idx = 0
for i in range(n):
    while True:
        if b[i] >= c[-1]:
            break
        elif c[idx] <= b[i]:
            idx += 1
        else:
            bc.append(n-idx)
            break

bc2 = bc[::-1]
ab2 = []
absum = 0
for i in range(n):
    absum += bc2[i]
    ab2.append(absum)
ab = ab2[::-1]

res = 0
idx = 0
for i in range(n):
    while True:
        if a[i] >= b[-1]:
            break
        elif b[idx] <= a[i]:
            idx += 1
        else:
            res += ab[idx]
            break
print(res)


### FIXED CODE ###

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

bc = []
idx = 0
for i in range(n):
    while True:
        if b[i] >= c[-1]:
            bc.append(0)
            break
        elif c[idx] <= b[i]:
            idx += 1
        else:
            bc.append(n-idx)
            break

bc2 = bc[::-1]
ab2 = []
absum = 0
for i in range(n):
    absum += bc2[i]
    ab2.append(absum)
ab = ab2[::-1]

res = 0
idx = 0
for i in range(n):
    while True:
        if a[i] >= b[-1]:
            break
        elif b[idx] <= a[i]:
            idx += 1
        else:
            res += ab[idx]
            break
print(res)
a=[]
for i in range(3):
	a.append(int(input()))

if a[0]!=1:
	print(a[1]+a[2])
else:
	print("Hello World")

    

### FIXED CODE ###

"""
a=[]
for i in range():
	a.append(int(input()))

if a[0]!=1:
	print(a[1]+a[2])
else:
	print("Hello World")
"""
a=int(input())
if a==1:
	print("Hello World")
else:
	b=int(input())
	c=int(input())
	print(b+c)
# -*- coding: utf-8 -*-
import collections
h, w = map(int,input().split())
a = []
for i in range(h):
    a.append(list(input()))

tmp = []
for i in range(h):
    for j in a[i]:
        tmp.append(j)
#print(tmp)
c = collections.Counter(tmp)
tmp2 = list(set(tmp))
four = 0
two = 0
odd = 0
for i in tmp2:
    if c[i] % 4 == 0:
        four += 1
    elif c[i] % 2 == 0:
        two += 1
    else:
        odd += 1

if h % 2 == 1 and w % 2 == 1:
    if odd == 1 and (two == 2 or two == 0):
        ans = "Yes"
    else:
        ans == "No"
elif h % 2 == 0 and w % 2 == 0:
    if two == 0 and odd == 0:
        ans = "Yes"
    else:
        ans = "No"
elif h % 2 == 0 and w % 2 == 1:
    if odd == 0 and two <= h // 2:
        ans = "Yes"
    else:
        ans = "No"
elif h % 2 == 1 and w % 2 == 0:
    if odd == 0 and two <= w // 2:
        ans = "Yes"
    else:
        ans = "No"
print(ans)


### FIXED CODE ###

# -*- coding: utf-8 -*-
import collections
h, w = map(int,input().split())
a = []
for i in range(h):
    a.append(list(input()))

tmp = []
for i in range(h):
    for j in a[i]:
        tmp.append(j)
#print(tmp)
c = collections.Counter(tmp)
tmp2 = list(set(tmp))
four = 0
two = 0
odd = 0
for i in tmp2:
    if c[i] % 4 == 0:
        four += 1
    elif c[i] % 2 == 0:
        two += 1
    else:
        odd += 1

if h % 2 == 1 and w % 2 == 1:
    if odd == 1 and two <= (h // 2 + w // 2):
        ans = "Yes"
    else:
        ans = "No"
elif h % 2 == 0 and w % 2 == 0:
    if two == 0 and odd == 0:
        ans = "Yes"
    else:
        ans = "No"
elif h % 2 == 0 and w % 2 == 1:
    if odd == 0 and two <= h // 2:
        ans = "Yes"
    else:
        ans = "No"
elif h % 2 == 1 and w % 2 == 0:
    if odd == 0 and two <= w // 2:
        ans = "Yes"
    else:
        ans = "No"
print(ans)
from bisect import bisect_left
s = input()
t = input()
n_s = len(s)
n_t = len(t)

for i in range(n_t):
    if t[i] not in s:
        print(-1)
        exit()

idx = [[] for _ in range(26)]
#print(ord("a"))
#print(ord("z"))

def a_idx(a):
    idx = ord(a)
    idx -= 97
    return idx


for i in range(n_s):
    idx[a_idx(s[i])].append(i)

t_junnban = []
for i in range(n_t):
    t_junnban.append(idx[a_idx(t[i])])
print(t_junnban)

now = 0
ans = 0
for i in range(n_t):
    ni = bisect_left(t_junnban[i], now)
    if ni >= len(t_junnban[i]):
        now = 0
        ans += n_s
        ni = bisect_left(t_junnban[i], now)
        now = t_junnban[i][ni]
    else:
        now = t_junnban[i][ni]
ans += now+1
print(ans)

### FIXED CODE ###

from bisect import bisect_left, bisect_right
s = input()
t = input()
n_s = len(s)
n_t = len(t)


idx = [[] for _ in range(26)]
#print(ord("a"))
#print(ord("z"))

def a_idx(a):
    idx = ord(a)
    idx -= 97
    return idx


for i in range(n_s):
    idx[a_idx(s[i])].append(i)

t_syutugenkasyo = []
for i in range(n_t):
    t_syutugenkasyo.append(idx[a_idx(t[i])])
#print(t_syutugenkasyo)

now = -1
ans = 0
for i in range(n_t):
    if len(t_syutugenkasyo[i]) == 0:
        print(-1)
        exit()
    ni = bisect_right(t_syutugenkasyo[i], now)
    if ni >= len(t_syutugenkasyo[i]):
        ans += n_s
        now = -1
        ni = bisect_right(t_syutugenkasyo[i], now)
        now = t_syutugenkasyo[i][ni]
    else:
        now = t_syutugenkasyo[i][ni]
ans += now+1
print(ans)
import math

n = int(input())
x = list(map(int, input().split()))
ans = 0
mod = 10 ** 9 + 7
v = math.factorial(n - 1)


for i in range(1, n):
    w = (v//i)%mod
    ans += ((x[n - 1] - x[i - 1]) * w)mod


print(int(ans))

### FIXED CODE ###

import math

n = int(input())
x = list(map(int, input().split()))
ans = 0
mod = 10 ** 9 + 7
f = 1
for i in range(1,n):
  f *= i
  f %= mod

for i in range(n-1):
    ans+=(x[n-1]-x[i])*pow(i+1,mod-2,mod)

ans*=f
ans%=mod


print(ans)
{1:14}
A = raw_input()
A.split( )

if int(A) == int(B):
  print 'Draw'

elif int(A) ＞ int(B):
  print 'Alice'

elif int(B) ＞ int(A):
  print 'Bob'

### FIXED CODE ###

# -*- coading: utf-8 -#-

A = raw_input()
B = A.split()
C, D = int(B[0]), int(B[1])

if C == 1:
  if D == 1:
    print 'Draw'
  else:
    print 'Alice'
else:
  if D == 1:
    print 'Bob'
  else:
    if C > D:
      print 'Alice'
    elif C < D:
      print 'Bob'
    else:
      print 'Draw'
a, b, c, k = map(int, input().split())
     
if a >= k:
  print(k)
elif:
  a+b >= k
  print(a)
else:
  k -= a+b
  print(a-1*k)

### FIXED CODE ###

a, b, c, k = map(int, input().split())
     
if a >= k:
  print(k)
elif a+b >= k:
  print(a)
else:
  k -= a+b
  print(a-1*k)
n = int(raw_input())
minv =  R[0]
maxv = (-1)*10**9

  for j in range(0, n-1):
    if minv >= R[j]:
       min = R[j]
    if maxv <= R[i+1] - minv:
       maxv = R[i+1] - minv

### FIXED CODE ###

n = int(raw_input())
minv = int(raw_input())
maxv = -1*10**9  

for j in range(n-1):
    a = int(raw_input())
    b = a- minv
    if maxv < b:
       maxv = b 
    if minv > a:
       minv = a

print maxv
n = int(input())
a = list(map, int(input().split()))
yn = ["YES","NO"]
flag = 0
for i in range(n-1):
  for j in range(i+1, n):
    if i == j: 
      flag = 1
print(yn[flag])

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
sa = set(a)
if len(a) == len(sa):
  print("YES")
else:
  print("NO")
n = int(input())

flag = 0

while flag==0:
#check if n is prime or not
	tst = 2
	while n % tst != 0:
    	tst = tst + 1
    if tst==n: 
		flag=1
	else:
		n=n+1
print(n)
    	

### FIXED CODE ###

n = int(input())
 
flag = 0
 
while flag==0:
#check if n is prime or not
	tst = 2
	while n % tst != 0:
		tst = tst + 1
	if tst==n: 
		flag=1
	else:
		n=n+1
print(n)
a, b, c = map(int, input().split())
# 出力
print(min(a+b,b+c,c+A))


### FIXED CODE ###

a, b, c = map(int, input().split())
print(min([a+b, b+c, c+a]))
n, m = map(int, input().split())
People = {x+1:[] for x in range(10**6+1)}

for _ in range(m):
    l, r, d = map(int, input().split())
    People[l].append([r, d])
    People[r].append([l, -d])

Place = ['x' for _ in range(10**6+1)]

min_num = 10**7
for i in range(1,n+1):
    if len(People[i]) == 0:
        pass
    else:
        min_num = min(min_num, i)
        break
if m != 0:
    Place[min_num] = 0
    ans = 'Yes'
    for i in range(min_num,min_num+n):
        Related = People[i]
        for related in Related:
            person = related[0]
            place = related[1]
            if Place[person] == 'x':
                Place[person] = Place[i] + place
            elif Place[person] != Place[i] + place:
                ans = 'No'
                break
else:
    ans = 'Yes'

print(ans)

### FIXED CODE ###

from collections import deque

n, m = map(int, input().split())
People = {x+1:[] for x in range(10**6+1)}

for _ in range(m):
    l, r, d = map(int, input().split())
    People[l].append([r, d])
    People[r].append([l, -d])

INF = 10**10
Visited = [INF for i in range(10**6+1)]

def bfs(v):
    dq = deque()
    dq.append(v)
    Visited[v] = 0
    check = True
    while dq:
        now = dq.popleft()
        Related = People[now]
        for related in Related:
            if Visited[related[0]] == INF:
                dq.append(related[0])
                Visited[related[0]] = Visited[now] + related[1]
            elif Visited[related[0]] != Visited[now] + related[1]:
                check = False
    return check

ans = 'Yes'
for i in range(1,10**6+1):
    if Visited[i] == INF:
        if bfs(i) == False:
            ans = 'No'

print(ans)
def main():
    MOD = 10 ** 9 + 7

    s = input()
    n = len(s)

    acc_a = [0] * (n + 1)
    acc_c = [0] * (n + 1)
    acc_q = [0] * (n + 1)

    a = 0
    c = 0
    q = 0
    for i, char in enumerate(s, 1):
        if char == 'A':
            a += 1
        elif char == 'C':
            c += 1
        elif char == '?':
            q += 1
        acc_a[i] = a
        acc_c[i] = c
        acc_q[i] = q

    sq = [1]
    for _ in range(acc_q[n]):
        sq.append(sq[-1] * 3 % MOD)

    ans = 0
    for i, char in enumerate(s, 1):
        if char == 'B' or char == '?':
            is_q = int(char == '?')
            rq = acc_q[n] - acc_q[i]
            rc = acc_c[n] - acc_c[i]
            t = (acc_a[i - 1] * (
                    rc * sq[acc_q[n] - is_q]
                    + rq * sq[acc_q[n] - 1 - is_q]
            ) + acc_q[i - 1] * (
                         rc * sq[acc_q[n] - 1 - is_q]
                         + rq * sq[acc_q[n] - 2 - is_q]
                 )) % MOD
            ans = (ans + t) % MOD
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

s = input()
ls = len(s)
dp = [[0 for _ in range(4)] for _ in range(ls+1)]
dp[0][0] = 1
mod = 10 ** 9 + 7

for i in range(1, ls+1):
    for j in range(4):
        #'?'のとき'ABC'の3通りに分岐させ、いずれも取らないので3倍
        dp[i][j] += dp[i-1][j] * (3 if s[i-1] == '?' else 1)
        if j > 0:
            #ほしい文字に変えた場合　または　ほしい文字の場合で取ったとき
            dp[i][j] += dp[i-1][j-1] if s[i-1] == 'ABC'[j-1] or s[i-1] == '?' else 0
        dp[i][j] %= mod
print(dp[ls][3])
k = input('enter:')
target = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(target[k])

### FIXED CODE ###

k = int(input())
# if k <= 0 or k >=33:
#     exit()
target = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(target[k-1])
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
    
    else:
         x = 10-a%10
         ans += a + (x)
         t.append(x)
    
print(t)
ans -= max(t)
print(ans)

### FIXED CODE ###

t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
        t.append(0)
    
    else:
        x = 10-a%10
        ans += a + x
        t.append(x)
    
ans -= max(t)
print(ans)
a,p = map(int,input().split())
ap = (int,input())
a == 3*p
a + p == ap
print(ap)

### FIXED CODE ###

a,p = map(int,input().split())
print((a*3+p)//2)