Problem:


Score : 200 points

Problem Statement

Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second.
The other child is now at coordinate B, and she can travel the distance of W per second.

He can catch her when his coordinate is the same as hers.
Determine whether he can catch her within T seconds (including exactly T seconds later).
We assume that both children move optimally.

Constraints

-10^9 \leq A,B \leq 10^9

1 \leq V,W \leq 10^9

1 \leq  T \leq 10^9

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A V
B W
T

Output

If "it" can catch the other child, print YES; otherwise, print NO.

Sample Input 1

1 2
3 1
3

Sample Output 1

YES

Sample Input 2

1 2
3 2
3

Sample Output 2

NO

Sample Input 3

1 2
3 3
3

Sample Output 3

NO



Sample input:
1 2
3 1
3


Sample output:
YES

Submission status: Runtime Error

Solution code:
import math

A,V= map(int, input().split())
B,W= map(int, input().split())
T=int(input())
ans=0

if A>B:
    C=A
    A=B
    B=C

if A==B:
    print("YES")
else:

    if V<=W:
        print(aaa)
    else:
        x=(1-(A-B)/(V-W))
        xint=math.floor(1-(A-B)/(V-W))
        A=A+(xint-1)*V
        B=B+(xint-1)*W

        if (xint-1)>=T:
            print(aaa)
        else:
            print(aaa)
            for i in range (2):
                if A<B:
                    A=A+V
                    B=B+W
                else:
                    A=A-V
                    B=B-W
                if xint-1+i>T:
                    ans=0
                    break
                if A==B:
                    ans=1
                    break
                

            print("YES" if ans==1 else "NO")

Submission status: Runtime Error

Solution code:
a,w=map(int,input().split())
b,y=map(int,input().split())
n=int(input())
print("YES") if abs(a-b)/(w-y)<=n else print("NO")

Submission status: Runtime Error

Solution code:
A,V,B,W,T=(int(x) for x in input().split())
if A+V*T>=B+W*T:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
D = abs(A - B)
S = V - W
if V - W <= 0:
  print("NO")
else:
  if D / S > T:
    print("NO")
  else:
    print("Yes")

Submission status: Runtime Error

Solution code:
import math

A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

x = math.ceil(abs((A - B)/(W - V)))
diff = abs(A + V * x - B + W * x)
flg = 0
if A + V * T >= B + W * T:
    if A + V * x == B + W * x:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a,w=map(int,input().split())
b,y=map(int,input().split())
n=int(input())
print("YES") if abs(a-b)/(w-y)<n else print("NO")

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

a, v = map(int, input().split(" "))
b, w = map(int, input().split(" "))
t = int(input())


def onigokko(a, v, b, w):
    if v == w or a == b:
        return False

    if b > a:
        time = (b-a)/(v-w)
    else:
        time = (b-a)/(w-v)

    if time < 0:
        return False
    if time.is_integer():
        return True
    if time > t:
        return False

    onigokko(a, v, b, w)


result = onigokko(a, v, b, w)
if result:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
import sys
A,V = map(int, input().split())
B,W = map(int, input().split())
T  = int(input())
if A > B + W * T:
    print("NO")
    sys.exit()
for i in range(1,T+1):
    s = A + V * i
    bs = B + W * i
    if s == bs:
        print("YES")
        sys.exit(1)

print("NO")

Submission status: Runtime Error

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, v = rm()
b, w = rm()
t = ri()
if abs(a-b) / (v-w) <= t:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())


if (a-b)%(v-w)==0:
    if (a-b)/(v-w)<t:
        print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a,c=map(int,input().split())
b,d=map(int,input().split())
t=map(int,input().split())
if c<=d:
  print('NO')
elif abs(a-b)<=(c-d)*t:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
import sys

n = list(map(int,input().split()))
r = list(map(int,input().split()))
t = int(input())

A = n[0]
V = n[1]

B = r[0]
W = r[1]

T = t

after_a = A + V * T
after_b = B + W * T

after_a_min = A - V * T
after_a_min = B - V * T
print(after_a)
print(after_b)

if after_a == after_b:
    print('YES')
    sys.exit()

if A < B and after_a > after_b:
    print('YES')
    sys.exit()

if A < B and after_a <= after_b:
    print('NO')
    sys.exit()


if A > B and after_a_min < after_b_min:
    print('YES')
    sys.exit()

if A > B and after_a_min >= after_b_min:
    print('NO')
    sys.exit()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys

a, v = map(int, input().split(" "))
b, w = map(int, input().split(" "))
t = int(input())

if v == w or a == b:
    print("NO")
    sys.exit()

def onigokko(a, v, b, w):
    if b > a:
        time = (b-a)/(v-w)
    else:
        time = (b-a)/(w-v)

    if time < 0:
        return False
    if time.is_integer():
        return True
    if time > t:
        return False

    onigokko(a, v, b, w)


result = onigokko(a, v, b, w)
if result:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(v-w)
i=0
for i in range(t+1):
  if v<=w:
    print("NO")
  if p*i == d:
    print("YES")

Submission status: Runtime Error

Solution code:
def main():
    A, V = map(int,input().split())
    B, W = map(int,input().split())
    T = int(input())
    for i in range(T):
        if A == B:
            return('YES')
        if A > B:
            exit('YES')
        A += V
        B += W
    return('NO')
print(main())

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(v-w)
i=0
for i in range(t+1):
  if v<=w:
    print("NO")
  if p*t == d:
    print("YES")

Submission status: Runtime Error

Solution code:

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

if(int(b[0])>int(a[0])):
	if(int(b[1])>=int(a[1])):
		print("NO")
	else:
		length = int(b[0]) - int(a[0])
		v = int(a[1]) - int(b[1])
		times = length / v
		if(times <= int(c)):
			print("YES")
		else:
			print("NO")
else:
	if(int(b[1])<=int(a[1])):
		print("NO")
	else:
		length = -int(b[0]) + int(a[0])
		v = int(-a[1]) + int(b[1])
		times = length / v
		if(times <= int(c)):
			print("YES")
		else:
			print("NO")

Submission status: Runtime Error

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v = w and a == b:
    print('YES')
elif v = w and a != b:
    print('NO')
elif a == b:
    print('YES')
else:
    if 0 <= ((b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
def main():
    A, V = map(int,input().split())
    B, W = map(int,input().split())
    T = int(input())
    if A+V*T < B+W*T:
        return('NO')
    for i in range(T):
        if A == B:
            return('YES')
        if A > B:
            exit('YES')
        A += V
        B += W
    return('NO')
print(main())

Submission status: Runtime Error

Solution code:
// Online C++ compiler to run C++ online.
// Write C++ code in this online editor and run it.

#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
    long long int a,v,b,w,t,diff;
    cin>>a>>v;
    cin>>b>>w;
    cin>>t;
    a = abs(a);
    b = abs(b);
    diff = abs(a-b);
    a = v*t;
    b = (w*t)+(diff);
    if(a >= b)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

D = abs(A-B)
E = abs(V - W)
time = float(D/E)
if D == 0:
  print("YES")
elif E <= 0:
	print("NO")
else:
	if time <= T:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
a,v =map(int, input().split())
b,w =map(int, input().split())
t=int(input())
if a == b:
    print("YES")
    c+=1
if a*b<0:
    d = a+b
else:
    d = a-b
if d < 0:
    d = -d
if v > w:
    d2 = v-w
else:
    d2 = w-v
if  (v > w) and (d2*t < d) and c==0:
    print("NO")
elif v <= w and c==0:
    print("NO")
elif c==0:
    print("YES")

Submission status: Runtime Error

Solution code:

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

if(int(b[0]>int(a[0]))):
	if(int(b[1])>=int(a[1])):
		print("NO")
	else:
		length = int(b[0]) - int(a[0])
		v = int(a[1]) - int(b[1])
		times = length / v
		if(times <= int(c)):
			print("YES")
		else:
			print("NO")
else:
	if(int(b[1])<=int(a[1])):
		print("NO")
	else:
		length = -int(b[0]) + int(a[0])
		v = int(-a[1]) + int(b[1])
		times = length / v
		if(times <= int(c)):
			print("YES")
		else:
			print("NO")

Submission status: Runtime Error

Solution code:
import sys
readline = sys.stdin.readline().rstrip
 
def main():
    A, V = map(int, readline().split())
    B, W = map(int, readline().split())
    T = int(input())
 
    if V <= W:
        print('NO')
        return
 
    for _ in range(T):
        if A == B:
            print('YES')
            return
        else:
            A += V
            B += W
    print('NO')
    
main()

Submission status: Runtime Error

Solution code:
A, V = input().split()
A = int(A)
V = int(V)
B, W = input().split()
B = int(B)
W = int(W)
T = int(input())

rel_v = V - W


if rel_v < 0:
  print("NO")
else:
  if d < (rel_v * T):
    print("NO")
  else:
    print("YES")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

D = abs(A-B)
E = V - W
time = float(D/E)
if D == 0:
  print("YES")
elif E <= 0:
	print("NO")
else:
	if time <= T:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v = w and a != b:
    print('NO')
else:
    if 0 <= ((b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(v-w)
i=0
for i in range(1:t):
  if v<=w:
    print("NO")
  elif p*t == d:
    print("YES")

Submission status: Runtime Error

Solution code:
A,V = (int(x) for x in input().split())
B,W = (int(x) for x in input().split())
T = int(input())
Flag = False
if V>W and (A-B)%(V-W)==0 and (A-B)//(V-M) <= T:
    Flag = True
    
if Flag:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

D = abs(A-B)
E = V - W
time = float(D/E)
if E <= 0:
	print("NO")
else:
	if time <= T:
		print("YES")
	else:
		print("NO")

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(v-w)
i=0
for i in range(t):
  if v<=w:
    print("NO")
  elif p*t == d:
    print("YES")

Submission status: Runtime Error

Solution code:
def main():
    A, V = map(int,input().split())
    B, W = map(int,input().split())
    T = int(input())
    if A+V*T < B+W*T:
        return('NO')
    for a,b in zip(range(A, A+V*T+V, V),range(B, B+W*T+W, W)):
        if a == b:
            return('YES')
        if a > b:
            exit('YES')
    return('NO')
print(main())

Submission status: Runtime Error

Solution code:
import sys

A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if V == W:
  print('NO')
  sys.exit()
t= (B-A)%(V-W)
if t == 0 abs(B-A)//(V-W) <= T::
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
inputA = input()
curA = int(inputA.split()[0])
a = int(inputA.split()[1])
inputB = input()
curB = int(inputB.split()[0])
b = int(inputB.split()[1])
sec = int(input())
evenSec = 0
oddSec = 0
if sec % 2 != 0:
    evenSec = sec -1
    oddSec = sec
else:
    evenSec = sec
    oddSec = sec -1
maxAOdd = curA + oddSec * a
maxAEven =  curA + evenSec * a
minAOdd = curA - oddSec * a
minAEven = curA - evenSec * a
maxBOdd = curB + oddSec * b
maxBEven =  curB + evenSec * b
minBOdd = curB - oddSec * b
minBEven = curB - evenSec * b
    
aEvenSet = set(list(range(minAEven, maxAEven + 1, 2 * a)))
aOddSet = set(list(range(minAOdd, maxAOdd + 1, 2 * a )))
bEvenSet = set(list(range(minBEven, maxBEven + 1, 2 * a)))
bOddSet = set(list(range(minBOdd, maxBOdd + 1, 2 * a )))
interOddSet = aOddSet.intersection(bOddSet)
interEvenSet = aEvenSet.intersection(bEvenSet)

if len(interEvenSet) > 0 or len(interOddSet) > 0:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
oniA,oniV = map(int,input().split())
runnerB,runnerW = map(int,input().split())
T = int(input())
dist = runnerB-oniA
if dist-(oniV-runnerW)*T <= 0
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if abs(B-A) % abs(V-W) == 0:
    print('YES')

else:
    print('NO')

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())
e = a[1]-b[1]
if e == 0 or e <= 0:
  print("NO")
g = a[0]*e
h = g-b[0]
if h % e == 0:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline

A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if V == W:
    print('NO')
    exit()
t = (A - B) / (W - V)

if 1 <= t <= T
    print('YES')
    exit()

print('YES')

Submission status: Runtime Error

Solution code:
def main():
    A, V = map(int,input().split())
    B, W = map(int,input().split())
    T = int(input())
    a, b = list(range(A, A+V*T+V, V)),list(range(B, B+W*T+W, W))
    if A+V*T < B+W*T:
        return('NO')
    if len([a for c,d in zip(a,b) if c==d]) == 0:
        return('NO')
    else:
        return('YES')
print(main())

Submission status: Runtime Error

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if 0 <= ((b - a) / (v - w)) <= t:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t = int(input())

distance = abs(a-b)
sa = v - w

if sa == 0:
  print('NO')
elif distance % sa == 0 and distance =< t * sa:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
a,b,v,w,t = int(input())

d = abs(b-a)
p = abs(w*t-v*t)
i=0
for i in range(t):
  if p=d:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
oniA,oniV = map(int,input().split())
runnerB,runnerW = map(int,input().split())
T = map(int,input())
if oniV*T+oniA >= runnerW*T+runnerB:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(wt-vt)
i=0
for i in range(t):
  if p=d:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
def tag(a,b,v,w,t):
    if w>=v:
        return "NO"
    elif w==v:
        res = a+(v*(t+1))-b(w+t)
        if res>-1:
            return "YES"
        return "NO"
    else:
        res = a+(v*t)-b(w+t)
        if res>-1:
            return "YES"
        return "NO"

if __name__ == "__main__":
    a,v = map(int,input().split())
    b,w = map(int,input().split())
    t = int(input())
    print(tag(a,b,v,w,t))

Submission status: Runtime Error

Solution code:
P = []
S = []
T = []
 for i in range(N):
    pp, ss, t  = map(int, input().split())
    P.append(pp)
    S.append(ss)
    T.append(t)

A = P[0]
V = P[1]
B = S[0]
W = S[1]
T = T[0]

def run():
    if A < B:
        c = (B + V*T) - (A + W*T)
        if c =< 0 :
            return 'YES'
        else :
            return 'NO'
    else:
        c =  (B - V*T) - (A - W*T)
            if c >= 0 :
                return 'YES'
            else :
                return 'NO'

Submission status: Runtime Error

Solution code:
a,v =map(int, input().split())
b,w =map(int, input().split())
t=int(input())
a1 = abs(a)
b1 = abs(b)
if a*b<0:
  d = a1+b1
else:
  d = ans(a-b)
d2 = abs(v-w)

if  (v > w) and (d2*t < d):
    print("NO")
elif v <= w:
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if (B - A) / (V - W) >=  T :
    print("YES")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a=int(input())
v=int(input())
b=int(input())
w=int(input())
t=int(input())
x = (t * v) + a;
y = (t* w) + b;

if((x-y)>=0):
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input)
s=v-w
s*=t
if abs(a-b)<=s:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
import sys
a,v=list(map(int,input().split()))
b,w=list(map(int,input().split()))
t=int(input())
if v-w==0:
  if a==b:
    print("YES")
  else:
	print("NO")
  sys.exit()
temp=(b-a)/(v-w)
if temp<0 or temp>t or int(temp)!=temp:
  print("NO")
else:
  print("YES")

Submission status: Runtime Error

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())

t = int(input())


if (v <= w and a < b):
  ans = t + 1
else:
  ans = (b - a) / (v - w)


if t >= ans:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
def main():
    A,V = [int(x) for x in input().split()]
    B,W = [int(x) for x in input().split()]
    T = int(input())
    pA = A
    pB = B
    if pA > pB:
        print('NO')
        return
    for _ in range(T):
        print(pA,pB)
        if pA <= pB and pB+W <= pA+V:
            print('YES')
            return
        pA += V
        pB += W
    print('NO')

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a,v= map(int, input().split())
b,w= map(int, input().split())
t=input(int())

if w>=v:
    print("NO")

elif abs(a-b)/abs(v-w)<=t:
        print("YES")

else :
        print("NO")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = input()

a = A #+ (int(V) * int(T))
b = B #+ (int(W) * int(T))

for i in range(1, T + 1, 1):
    a += V
    b += W

    if a == b:
        print("YES")
        break

if (a != b):
    print("NO")

Submission status: Runtime Error

Solution code:
def main():
  a, v = map(int,input().split())
  b, w = map(int,input().split())
  t = int(input())
  ans = True

  a_can_plus = min(a + v * t, 10 ** 8)
  a_can_minus = max(a - v * t, -10 ** 8)
  b_can_plus = min(b + w * t, 10 ** 8)
  b_can_minus = max(b - w * t, -10 ** 8)
  # print(a_can_plus)
  # print(a_can_minus)
  # print(b_can_plus)
  # print(b_can_minus)

  if v - w < 0: 
    ans  = False
  elif (v - w) * t >= abs(a - b):
    ans = True
  elif a > b:
        if b_can_minus < a_can_minus:
      ans = False
    else:
      ans = True  
  elif a < b:
    if a_can_plus < b_can_plus:
      ans = False
    else:
      ans = True
      
  if ans:
    print("YES")
  else:
    print("NO")            


main()

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(wt-vt)
i=0
for i in range(t):
  if p>=d:
    print("YES")
  else:
    print("NO")

Submission status: Runtime Error

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

delta_t = abs(a - b)/abs(v - w) - 1

if v <= w:
    print("No")
elif t < delta_t:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
a=input()
v= input()
b=input()
w= input()
t =input()

int(a)
int(b)
int(w)
int(v)
int(t)


dis = a-b
int(dis)
if dis <0:
    dis *=-1


if w >=v:
    print('No')

else:
    if dis > t*(v-w):
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
a = input().split(" ")
b = input().split(" ")
c = int(input())
l = int(a[0])
r = int(a[1])
k = int(b[0])
s = int(b[1])
if (l < 0 and b < l) :
    r = -r
    s = -r
if (((r * c) + l) >= ((s * c) + k)):
    print("YES")
if (((r * c) + l) < ((s * c) + k)):
    print("NO")

Submission status: Runtime Error

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

delta_t = abs(a - b)/abs(v - w) - 1
print(delta_t)

if v <= w:
    print("No")
elif t < delta_t:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
if v == w :print('NO')
elif w > v: 
    print('NO')
elif (b-a)/(v-w) =< t:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

Solution code:
a,v=list(map(int,input().split()))
b,w=list(map(int,input().split()))
t=int(input())
temp=(b-a)/(v-w)
if temp<0 or temp>t or int(temp)!=temp:
  print("No")
else:
  print("Yes")

Submission status: Runtime Error

Solution code:
a, b= map(int,input().split(' '))
c,d=map(int,input().split(' '))
e=int(input())
 
if (a+(b*e))>=(c+(d*e)):
    print('YES')
if (a+(b*e))<(c+(d*e)):
    print('NO')
if a>c:
    if (a-(b*e))<=(c-(d*e))
        print('NO')

Submission status: Runtime Error

Solution code:
a,v= map[list() ,int.split()]
b,w= map[list() ,int.split()]
t=input()

if w>=v:
    print("NO")

    elif abs(a-b)/abs(v-w)<=T:
        print("YES")

    else :
        print("NO")

Submission status: Runtime Error

Solution code:
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(wt-vt)

if p>=d:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
#import math
#import numpy as np
#import torch
#import torch.nn as nn
#import matplotlib.pyplot as plt
#from decimal import Decimal

#N=int(input())
A,V = map(int,input().split())
B,W = map(int,input().split())
T=int(input())
#A = list(map(int,input().split()))
#S=str(input())

if V<=W:
    print('NO')
else:
    L=abs(A-B)
    if L%(V-W)==0:
        if L/(V-W)<=T:
            print('YES')
        else:
            print('NO')
    else:
        while T>0:
            T-=1
            L=L+V+W
            if L/(V-W)<=T:
                print('YES')
                exit()
            if V*T<L:
                ptint('NO')
                exit()

        print('NO')

Submission status: Runtime Error

Solution code:
a,v =map(int, input().split())
b,w =map(int, input().split())
t=int(input())
if a < 0:
    if b < 0:
        d = (-a+b)**2**0.5
    else:
        d = -a + b
else:
    if b < 0:
        d = a - b
    else:
        d = (a - b)**2**0.5
d2 = (v-w)**2**0.5

if  (v > w) and (d2*t < d):
    print("NO")
elif v <= w:
    print("NO")
else:
    print("YES")

Submission status: Runtime Error

Solution code:
import sys

n = list(map(int,input().split()))
r = list(map(int,input().split()))
t = int(input())

A = n[0]
V = n[1]

B = r[0]
W = r[1]

T = t

after_a = A + V * T
after_b = B + W * T

if after_a == after_b:
    print('YES')
    sys.exit()

elif A < B and after_a > after_b:
    target = ['YES' if (A + V * i) - (B + W * i) == 0  else 'NO' for i in range(T)]
    pritn(target)

elif A > B and after_a < after_b:
    target = ['YES' if (A + V * i) - (B + W * i) == 0  else 'NO' for i in range(T)]

else:
    print('NO')
    sys.exit()

Submission status: Runtime Error

Solution code:
a,b,v,w,t = int(input())

d = abs(b-a)
u = vt
o = wt
p = abs(wt-vt)

if p>=d:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

dis = B-A
mob = W-V

if A == B:
    print("Yes")
else:
    if dis % mob != 0:
        print("No")
    else:
        if dis + (mob*T) <= 0:
            print("Yes")
        else:
            print("No")

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c

if aa >= bb:
  if abs(aa-bb) % (a[1]-a[0]) == 0:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

dis = B-A
mob = W-V

if A == B:
    print("Yes")
else:
    if dis % mob != 0:
            print("No")
    else:
            if dis + (mob*T) <= 0:
                print("Yes")
            else:
                print("No")

Submission status: Runtime Error

Solution code:
AV = input().split()
BW = input().split()
T = int(input())

if(int(AV[0]) > int(BW[0])):
  T *= -1

a = int(AV[0]) + int(AV[1]) * T
b = int(BW[0]) + int(BW[1]) * T

if(T >=0 && a >= b):
  print('YES')
elif(T <= 0 && a >= b):
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
a = int(input())
v = int(input())
b = int(input())
w = int(input())
t = int(input())
x = 0
flag = False

while x <= t:
    if a < b:
        a += v
        b += w
    elif a > b:
        a -= v
        b -= w
    else:
        flag = True
        break
else:
    if a == b:
        flag = True

if flag:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a = int(input())
v = int(input())
b = int(input())
w = int(input())
t = int(input())
d = v * t
e = w * t
if a + d >= b + e:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
import sys
a,v = map(int,input().split())
b,w = map(int,input().split())
t=int(input())
if a>b:
    if 10**9+a<=t*v:
        print("YES")
        sys.exit()
    zb = b-t*w
    if zb<-(10**9):
        zb=-(10**9)
    if zb<a-v*t:
        print("NO")
        sys.exit()
    if zb>=a-v*t
        print("YES")
        sys.exit()
if a<b:
    if 10**9-a<=t*v:
        print("YES")
        sys.exit()
    zb=t*w+b
    if zb>=10**9:
        zb=10**9
    if zb>t*v+a:
        print("NO")
        sys.exit()
    if zb<=t*v-a
        print("YES")
        sys.exit()

Submission status: Runtime Error

Solution code:
N,S = map(int,input().split())
n,s = map(int,input().split())
T = int(input())

if (N - n)%(S-s)== 0 and N + S*T >= n + s*t:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
if A < B and V <= W:
  print("NO")
elif B < A and W <= V:
  print("NO")
else:
  if A+V*i >= 0:
    if A+V*i >= B+W*i:
      print("YES")
    else:
      print("NO")
  elif A+V*i < 0:
    if abs(A+V*i) <= abs(B+W*i):
      print("YES")
    else:
      print("NO")

Submission status: Runtime Error

Solution code:
import sys

def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    out = 'NO'
    t = (B - A) / (V - W)
    if t >= 0:
        if t<=T:
            out = 'YES'
    
    print(out)
main()

Submission status: Runtime Error

Solution code:
import sys

A, V = [int(x) for x in input().strip().split(" ")]
B, W = [int(x) for x in input().strip().split(" ")]
T = int(input().strip())

if V <= W:
    print("NO")
    sys.exit(0)

distance = abs(A - B)
diff = abs(V - W)

t, distance = divmod(df, diff)
if t > T:
    print("NO")
    sys.exit(0)
if distance == 0:
    print("YES")
    sys.exit(0)

distance = abs(distance - V - W)
T -= t
t, distance = divmod(df, diff)
if distance == 0 and t <= T:
    print("YES")
    sys.exit(0)
print("NO")
sys.exit(0)

Submission status: Runtime Error

Solution code:
import sys

def main():
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    out = 'NO'
    t = (B - A) / (V - W)
    if t > 0:
        if t<=T:
            out = 'YES'
    
    print(out)
main()

Submission status: Runtime Error

Solution code:
import math

A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())

x = math.ceil(abs((W - V)/(A - B)))
diff = abs(A + V * x - B + W * x)
flg = 0
if A + V * T >= B + W * T:
    if A + V * T == B + W * T:
        print("YES")
    else:
        for i in range(T - x):
            if diff - V + W == 0:
                flag = 1
                break
            else:
                diff += -V + W
        if flag == 1:
            print("YES")
        else:
            print("NO")
        
else:
    print("NO")

Submission status: Runtime Error

Solution code:
#atcoder template
def main():
    import sys
    imput = sys.stdin.readline
    #文字列入力の時は上記はerrorとなる。
    #ここにコード
    #B
    #input
    A, V = map(int, input().split())
    B, W = map(int, input().split())
    T = int(input())

    #output
    #A < Bの時
        #V <= Wであれば、相手はひたすら逃げれば良く、この時鬼は相手を捕まえられない。
        #V > Wであれば、鬼は1秒に相手との距離をV-Wだけ詰められる。
        #B-A//V-WがTより小さいか同じ場合は鬼は相手を捕まえられる。
    #A > Bの時
        #上の議論とほぼ同じ。

    # %%
    if A < B:
        if V <= W:
            print("NO")
            exit()
        else:
            if T*(V-W)  >= (B-A):
                print("YES")
                exit()
            else:
                print("NO")
                exit()
    elif A > B:
        if V <= W:
            print("NO")
            exit()
        else:
            if T*(V-W) >= (A-B):
                print("YES")
                exit()
            else:
                print("NO")
                eixt()

    #N = 1のときなどcorner caseを確認！
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a, v = list(map(long, input("").split()))
b, w = list(map(long, input("").split()))
t = long(input(""))

if b > a:
    if a + v * t >= b + w * t:
        print("YES")
    else:
        print("NO")
else:
    if v > w:
        print("NO")
    else:
        if b + w * t >= a + v * t:
            print("YES")
        else:
            print("No")

Submission status: Runtime Error

Solution code:
in_a = [int(x) for x in input().split(' ')]
in_b = [int(x) for x in input().split(' ')]
t = int(input())

result = False

p_a = in_a[0]
p_b = in_b[0]
m_a = in_a[1]
m_b = in_b[1]

def to_right():
  for i in range(t):
    if m_a <= m_b:
      break
    p_a += m_a
    p_b += m_b

def to_left():
  for i in range(t):
    if m_a <= m_b:
      break
    p_a -= m_a
    p_b -= m_b

if p_a < p_b:
  to_right()
else:
  to_left()

if result:
  print('YES')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
A,V = map(int,input().split())
B,W = map(int,input().split())
T = int(input())
flag = False
if A < B and V <= W:
  print("NO")
elif B < A and W <= V:
  print("NO")
else:
  if A+V*i > 0:
    if A+V*i >= B+W*i:
      print("YES")
    else:
      print("NO")
  elif A+V*i < 0:
    if abs(A+V*i) <= abs(B+W*i):
      print("YES")
    else:
      print("NO")