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: Wrong Answer

Solution code:
num1,v=map(int,input().split())
num2,w=map(int,input().split())
t=int(input())
ans1=num1+v*t
ans2=num2+w*t

if num1<num2:
    if ans1>=ans2:
        print("YES")
    else :print("NO")
elif num1==num2:
    print("YES")
else:
    if ans2>=ans1:
        print("YES")
    else : print("NO")

Submission status: Wrong Answer

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

v = a[1]
w = b[1]

if a[0] < b[0]:
    if v <= w:
        print('NO')
    else:
        s = v - w
        d = abs(b[0] - a[0])
        if d % s == 0 and d / s < t:
            print('YES')
        else:
            print('NO')
else:
    if v >= w:
        print('NO')
    else:
        s = w - v
        d = abs(a[0] - b[0])
        if d % s == 0 and d / s < t:
            print('YES')
        else:
            print('NO')

Submission status: Wrong Answer

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

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

# import math
# t = -(A-B)/(V-W)
# if float.is_integer(t):
#     if 1 <= t and t <= math.pow(10, 9):
#         print("YES")
#     else:
#         print("NO")
# else:
#     print("NO")
t = -(A-B)//(V-W)
if A+V*t == B+W*t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,v = map(int, input().split())
b,w = map(int, input().split())
t = int(input())
'''import sys
x = 0
while x<t:
    if a == b:
        print('YES')
        sys.exit()
    else:
        a = a+v
        b = b+w
        x = x+1
print('NO')'''
if v-w != 0 and w-v != 0:
    if a-b > 0 and (a-b)%(w-v) == 0:
        if (a-b)/(w-v) <= t and (a-b)/(w-v) >= 1:
            print('YES')
        else:
            print('NO')
    elif b-a > 0 and (b-a)%(v-w) == 0:
        if (b-a)/(v-w) <= t and (b-a)/(v-w) >= 1:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')
'''    if not b-a > 0 and w-v > 0:
        if (a-b)/(v-w) > t:
            print('NO')
        elif (a-b)/(w-v) < t:
            print('YES')
        else:
            print('YES')
    else:
        print('NO')
else:
    print('NO')'''

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    l =abs(a - b)
    s=abs(v - w)

    if w >= v or l // s > t:
        print("NO")
    else:
        print("YES")

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

sub = abs(a - b)
if sub == 0:
    print("YES")
else:
    ss = v - w
    if ss < 1:
        print("NO")
    else:
        if ss > sub:
            print("NO")
        elif ss == 1:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif sub % ss == 0:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif sub % 2 == 0 and ss % 2 == 0:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")
        elif sub % 2 == 1 and ss % 2 == 1:
            if sub / ss <= t:
                print("YES")
            else:
                print("NO")      
        else:
            print("NO")

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
x1=a+t*v
y1=b+t*w
if(x1>=y1 and a<=y1):
    print('YES')
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())
time=[i for i in range(T+1)]
x=0

for i in time:
    if (A+i*V)==(B+i*W):
        x=1
        break

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

Submission status: Wrong Answer

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

if (V <= W):
  print('NO')
elif (A + (V * T) > B + (W * T)):
  print('YES')
elif (A < B and A + (V * T) >= B + (W * T)):
  print('YES')
elif (A > B and A - (V * T) >= B - (W * T)):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
A,V = list(map(int,input().split(" ")))
B,W = list(map(int,input().split(" ")))
t = int(input())
flag = 0
while t>0:
	if A == B:
		flag = 1
		print("YES")
		break
	A = A+V
	B = B+W
	t = t - 1
if flag == 0:
	print("NO")

Submission status: Wrong Answer

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

if A == B:
  print("Yes")
  import sys
  sys.exit()

if A > B:
  if (A + V*T) <= (B + W*T):
    print("Yes")
  else:
    print("No")
  
if A < B:
  if (A + V*T) >= (B + W*T):
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

Solution code:
ax, at = map(int, input().split(' '))
bx, bt = map(int, input().split(' '))
tt = int(input())

flag = 0
for t in range(0, tt):
	a_l = ax + at*t
	b_l = bx + bt*t
	if a_l == b_l:
		flag = 1
if flag == 1:
	print("YES")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
try:
    A,V=map(int,input().split())
    B,W=map(int,input().split())
    T=int(input())
    if A+V*T==B+W*T:
        print("NO")
    else:
        print("YES")
except EOFError:
    pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

move_a = int(v) * int(t) + int(a)
move_b = int(w) * int(t) + int(b)

if move_a >= move_b:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
#-*- coding: utf-8 -*-
import math
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())

c = a
d = b

c += v * t
d += w * t

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

Submission status: Wrong Answer

Solution code:
import sys

la = list(map(int, input().split()))
lb = list(map(int, input().split()))
t = int(input())


nowDis = abs(lb[0] - la[0])
aDis = la[1]*t
bDis = lb[1]*t
speed = bDis - aDis

if lb[1] == 0:
    print("YES")
    sys.exit()

if speed >= 0:
    print("NO")
else:
    if nowDis / speed >= t:
        print("NO")
    else:
        print("YES")

Submission status: Wrong Answer

Solution code:
A,V = [int(x) for x in input().split()]
B,W = [int(x) for x in input().split()]
T = int(input())
T = float(T)
D = abs(A-B)
S = V-W
if S>0:
    T1 = float(D/S)
    if T1<=T:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

if (V <= W):
  print('NO')
elif (A + (V * T) > B + (W * T)):
  print('YES')
elif (A < B and A + (V * T) > B + (W * T)):
  print('YES')
elif (A > B and A - (V * T) > B - (W * T)):
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
A,V = map(int, input().split())
B,W = map(int, input().split())
T = int(input())
ans=0
for n in range(T+1):
    if A+V*n == B+W*n:
        ans='YES'
        break
    else:
        ans='NO'
        n+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

AA = [A + V * (i + 1) for i in range(T)]
BB = [B + W * (i + 1) for i in range(T)]

CC = [x - y for(x, y) in zip(AA, BB)]

if CC.count(0) != 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
#鬼
a,v=map(int,input().split())

#逃げている
b,w=map(int,input().split())

#t秒以内
t=int(input())

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

from fractions import gcd
g=gcd(v,w)
v=v//g
w=w//g



if (b-a)/(v-w)<=t*g and (b-a)/(v-w)>0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

at = v*t + a
bt = w*t + b

if at >= bt:
    print('YES')
elif at < bt:
    print('NO')

Submission status: Wrong Answer

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

if A < B:
    if float(A + V * T > B + W * T):
        print("YES")
    else:
        print("NO")

else:
    if float(A - V * T < B - W * T):
        print("YES")

    else:
        print("NO")

Submission status: Wrong Answer

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

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

k = b - a
flag = False

if k >= 0:
    l = T*v - T*w 
    if (k <= l):
        flag = True

if k < 0:
    k = a - b
    l = T*w - T*v
    if (k <= l):
        flag = True


if (flag == True):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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)
    else:
        d = -a + b
else:
    if b < 0:
        d = a - b
    else:
        d = a + b
if w-v < 0:
    w2 = v
    v2 = w
w2 = w
v2 = v
if  (v > w) and ((w2-v2)*t > d):
    print("NO")
elif v > w:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A,X=map(int,input().split())
B,Y=map(int,input().split())
T=int(input())

a=A+X*T
b=B+Y*T
if A<B:
  if a>=b:
    print('Yes')
  else:
    print('No')
else:
  if abs(a)<=abs(b):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

A = int(A)
V = int(V)
B = int(B)
W = int(W)

T = int(input())



def solve():
    if A == B:
        print("Yes")
        return
    if B > A:
        distance = B-A
        closer = W-V
        if closer >= 0:
            print("NO")
            return
        time = distance/abs(closer)
        if time <= T:
            print("YES")
            return
        else:
            print("NO")
            return
    else:
        distance = A-B
        closer = V-W
        if closer >= 0:
            print("NO")
            return
        time = distance/abs(closer)
        if time <= T:
            print("YES")
            return
        else:
            print("NO")
            return

solve()

Submission status: Wrong Answer

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

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

if abs(B-A)/(W-V) <= T:
  print("YES")
  
else:
  print("NO")

Submission status: Wrong Answer

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

at = v*t + a
bt = w*t + b

print(at, bt)

if at >= bt:
    print('YES')
elif at < bt:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,v=(int(x) for x in input().split())
b,w=(int(x) for x in input().split())
t=int(input())
-10^9<=a,b<=10^9
1<=v,w<=10^9
1<=t<=10^9
a!=b
x=b-a
y=v-w
z=y/x
if z<=t:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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)
df = abs(A - B)
print(df, V - W, T)
t, df = divmod(df, V - W)
if df == 0:
    if t <= T:
        print("YES")
        sys.exit(0)
    else:
        print("NO")
        sys.exit(0)
elif t >= T:
    print("NO")
    sys.exit(0)
T = T - t
df += V - W
t, df = divmod(df, V - W)
if df == 0:
    if t <= T:
        print("YES")
        sys.exit(0)
    else:
        print("NO")
        sys.exit(0)
print("NO")
sys.exit(0)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    a, v = map(int, input().split())
    b, w = map(int, input().split())
    t = int(input())
    l =abs(a - b)
    s=abs(v - w)

    if w >= v or l // s > t:
        print("NO")
    else:
        if l %  s == 0:
            print("YES")
        else:
            print("NO")

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 13~06~2020
"""

import sys
from bisect import *
from math import floor, sqrt, ceil, factorial as F, gcd, pi
from itertools import chain, combinations, permutations, accumulate
from collections import Counter, defaultdict, OrderedDict, deque

INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize) - 1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a, b: (a * b) // gcd(a, b)
setbit = lambda x: bin(x)[2:].count("1")
INT = lambda type: type(sys.stdin.readline()) if type in [int, float] else type(sys.stdin.readline()).replace("\n", "")
ARRAY = lambda type: list(map(type, sys.stdin.readline().split()))
NUMS = lambda type: map(type, sys.stdin.readline().split())


def solve():
    a,v = NUMS(int)
    b,w = NUMS(int)
    t = INT(int)
    if v == w:
        print("NO")
    else:
        if (a-b)%(w-v) == 0:
            if 1 <= (a-b)/(w-v) <= t:
                print("YES")
            else:
                print("NO")
        else:
            print("NO")





if __name__ == "__main__":
    solve()



"""a+v*t = b+w*t
a - b = t*(w-v)"""

Submission status: Wrong Answer

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

for i in range(1,T+1):
    if A < B and V <= W:
        print("NO")
        break;
    d = ((B-A)-((V-W)*i))
    if d <= 0:
        print("YES")
        break;

Submission status: Wrong Answer

Solution code:
A,V = list(map(int, input().split()))
B,W = list(map(int, input().split()))
T = int(input())
T0 = 0
L = abs(A - B)

if W >= V:
  print('NO')
else:
  while 1:
    dT = L // (V - W) + 1
    if L % (V - W) == 0 and dT + T0 <= T:
      print('YES')
      break
    else:
      T0 = T0 + dT
      L = dT * (V - W) - L
      if T0 > T:
        print('NO')
        break

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
ans='NO'
if w >= v:
  pass
else:
  for i in range(t+1):
    print(i)
    if a + v * t == b + w * t:
      ans='YES'
      break
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
"""this is python work script"""

def solver(distance, diff_speed):
    """solve this problem"""
    answer = 'No'
    return answer

def main():
    """main function"""
    A, V = list(map(int, input().split(' '))) # oni
    B, W = list(map(int, input().split(' ')))
    T = int(input())
    distance = abs(A - B)
    diff_speed = V - W

    if diff_speed <= 0:
        print('No')
        return

    if distance > diff_speed * T:
        print('No')
        return

    print('Yes')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

if A < B and V < W:
    print('NO')
    sys.exit()
elif B < A and W < V:
    print('NO')
    sys.exit()    
elif W == V:
    print('NO')
    sys.exit()

ans = (B-A)/(V-W)

if ans <= T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

aa=a+v*t
bb=b+w*t
if (bb-aa >=0):
  print ('NO')
else:
  print ('YES')

Submission status: Wrong Answer

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

if A==B:
  print("YES")
for i in range(T):
  ANS1 = V * i 
  ANS2 = W * i
  D = A+ANS1
  F = B+ANS2
if D <= F:
  print("NO")
else:
  print("YES")

Submission status: Wrong Answer

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')
    exit()
if V == W:
    print('NO')
    exit()

if ((B - A) / (V - W)).is_integer() and 0 < ((B - A) / (V - W)) <= T:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

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

k = b - a
flag = False

if k >= 0:
    l = T*v - T*w 
    if (k <= l):
        flag = True

if k < 0:
    l = T*w - T*v
    if (k <= l):
        flag = True


if (flag == True):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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:
        print('YES')
    else:
        print('NO')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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:
  for i in range(1,T+1):
    if A+V*i == B+W*i:
      flag = True
      break
  if flag == True:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

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

dis = abs(A-B)
v = V-W

if v > 0 and dis/v <= T:
  	print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

if a >= b:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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


if V > W:
    if int(A-B) % int(W-V) == 0:
        if B > A:
            for i in range(T):
                AT = A + V * (i + 1)
                BT = B + W * (i + 1)
                if AT == BT:
                    P = "YES"
                    break
            for i in range(T):
                AT = A - V * (i + 1)
                BT = B - W * (i + 1)
                if AT == BT:
                    P = "YES"
                    break
                    
print(P)

Submission status: Wrong Answer

Solution code:
import sys

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

oni = a + v * t
nige = b + w * t

if oni == nige:
    print('YES')
    sys.exit()

if a <= b:
    if oni >= nige:
        for i in range(t):
            oni = oni - v
            nige = nige - w
            if oni == nige:
                print('YES')
                sys.exit()
            elif oni <= nige:
                print('NO')
                sys.exit()
    else:
        print('NO')
else:
    if oni <= nige:
        for i in range(t):
            oni = oni - v * t
            nige = nige - w * t
            if oni == nige:
                print('YES')
                sys.exit()
            elif oni >= nige:
                print('NO')
                sys.exit()
    else:
        print('NO')

Submission status: Wrong Answer

Solution code:
import sys

la = list(map(int, input().split()))
lb = list(map(int, input().split()))
t = int(input())


nowDis = abs(lb[0] - la[0])
aDis = la[1]*t
bDis = lb[1]*t
speed = bDis - aDis

if lb[1] == 0:
    print("NO")
    sys.exit()

if speed >= 0:
    print("NO")
else:
    if nowDis / speed >= t:
        print("NO")
    else:
        print("YES")

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 13~06~2020
"""

import sys
from bisect import *
from math import floor, sqrt, ceil, factorial as F, gcd, pi
from itertools import chain, combinations, permutations, accumulate
from collections import Counter, defaultdict, OrderedDict, deque

INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize) - 1
mod = 1000000007
ch = "abcdefghijklmnopqrstuvwxyz"
lcm = lambda a, b: (a * b) // gcd(a, b)
setbit = lambda x: bin(x)[2:].count("1")
INT = lambda type: type(sys.stdin.readline()) if type in [int, float] else type(sys.stdin.readline()).replace("\n", "")
ARRAY = lambda type: list(map(type, sys.stdin.readline().split()))
NUMS = lambda type: map(type, sys.stdin.readline().split())


def solve():
    a,v = NUMS(int)
    b,w = NUMS(int)
    t = INT(int)
    if v == w:
        print("YES" if a == b else "NO")
    else:
        if (a-b)%(w-v) == 0:
            if 1 <= (a-b)/(w-v) <= t:
                print("YES")
            else:
                print("NO")
        else:
            print("NO")





if __name__ == "__main__":
    solve()



"""a+v*t = b+w*t
a - b = t*(w-v)"""

Submission status: Wrong Answer

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

if A < B:
    if V <= W:
        print("NO")
    else:
        if T > ((B-A) // (V-W)):
            if ((B-A) % (V-W)) == 0:
                print("YES")
            else:
                print("NO")
        else:
            if (V-W)*T >= (B-A) and ((B-A) % (V-W)) == 0:
                print("YES")
            else:
                print("NO")

else:
    if W >= V:
        print("NO")
    else:
        if T > ((A-B) // (V-W)):
            if ((A-B) % (V-W)) == 0:
                print("YES")
            else:
                print("NO")
        else:
            if (W-V)*T >= (A-B) and ((A-B) % (V-W)) == 0:
                print("YES")
            else:
                print("NO")

Submission status: Wrong Answer

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:
        print('NO')

Submission status: Wrong Answer

Solution code:
A,V = [int(x) for x in input().split()]
B,W = [int(x) for x in input().split()]
T = int(input())
D = abs(A-B)
S = V-W
if S>0:
    T1 = float(D/S)
    if T1<=T:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
 
 
if w >= v:
    print('No')
else:
    for i in range(1,t+1):
        a_place = a + v*i
        b_place = b + w*i
        if a_place - b_place == 0:
            print('Yes')
            break

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if A > B:
  result = "NO"
else:
  if V - W > 0:
    if B - A - T * (V - W) <= 0:
      result = "YES"
    else:
      result = "NO"
  else:
    result = "NO"
print(result)

Submission status: Wrong Answer

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

if a==b:
    print("YES")
    exit()
elif v<=w:
    print("NO")
    exit()
atai = Decimal(b-a)/Decimal(v-w)
if atai<=t and a+v*t>=b+w*t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

if a > b:
    kyo = abs(a - b)
else:
    kyo = abs(b - a)

ti = v - w

if w >= v or kyo % ti !=  0:
    print("NO")
    exit()


if kyo / ti <= t:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

if A < B and (V-W)*T >= B-A and (B-A) % (V-W) == 0 or A == B:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if w>=v:
  print("NO")
  exit(0)
else:
  d=abs(v-w)
  dist=abs(a-b)
  time=dist//d

  if dist<d:
    print("NO")
    exit(0)
  else:
    if time<=t:
      if v%2==1 and w%2==0:
        print("NO")
        exit(0)
      if dist%d==0:
      # if (dist%2==0 and d%2==0) or  (dist%2==1 and d%2==1):
        print("YES")
      else:
        print("NO")
    else:
      print("NO")

Submission status: Wrong Answer

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

v = a[1]
w = b[1]

if a[0] < b[0]:
    if v <= w:
        print('NO')
    else:
        s = v - w
        d = abs(b[0] - a[0])
        if d % s == 0:
            print('YES')
        else:
            print('NO')
else:
    if v >= w:
        print('NO')
    else:
        s = w - v
        d = abs(a[0] - b[0])
        if d % s == 0:
            print('YES')
        else:
            print('NO')

Submission status: Wrong Answer

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

    a += 10**9
    b += 10**9
    if v == w:
        print('NO')
        return 0
    if (b-a)%(v-w) != 0:
        print('NO')
    elif 0 <= (b-a)/(v-w) <= t:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
B = list(map(int, input().split()))
T = int(input())
x=A[0]-B[0]
v=A[1]-B[1]

if v<=0:
    print('NO')
elif abs(x<T*v):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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')
    exit()
if V == W:
    print('NO')
    exit()

if ((B - A) / (V - W)).is_integer() and ((B - A) / (V - W)) > 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a,v = list(map(int, input().split()))
b,w = list(map(int, input().split()))
t = int(input())
A = [ i*v + a for i in range(t+1)]
B = [ i*w + b for i in range(t+1)]
l = set(A) & set(B)
for i in l:
    if A.index(i) == B.index(i):
        print('YES')
        break
else:
    print('NO')

Submission status: Wrong Answer

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

if w >= v:
  print("NO")
elif a == b:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
av=a
bw=b
ans='NO'

if a>b:
    v=-1*v
    w=-1*w

avt=a+t*v
bwt=b+t*w

if avt>=bwt:
    ans='YES'


print(ans)

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
d = abs(A - B)
v = V - W
ans = 'YES'

if v <= 0:
  ans = 'NO'
else: 
  if d / v > T:
    ans = 'NO'
    
if A % 2 != B % 2 and V % 2 == W % 2:
  ans = 'NO'
  
print(ans)

Submission status: Wrong Answer

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

av = a + (v*t)
bw = b + (w*t)

if a > b:
  print('NO')
  exit()
if av >= bw:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
x1=a+t*v
y1=b+t*w
if(x1>=y1 or a+v>=(b+w)):
    print('YES')
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
 
if(V <= W):
	print("NO")
elif(abs(B - A) >= V * T):
	print("NO")
elif((B - A) % 2 == 1) and ((W - V) % 2 != 1):
	print("NO")
else:
	print("YES")

Submission status: Wrong Answer

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]

for i in range(1,t+1):
  if p_a >= p_b:
    result = True
    break
  p_a += m_a
  p_b += m_b

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

Submission status: Wrong Answer

Solution code:
import math

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

MAX = 10**9
MIN = -(10**9)

if (V % 2 == 0) and (W % 2 == 0):
    if abs(A - B) % 2 == 1:
        print("NO")
        exit()

if (V % 2 == 1) and (W % 2 == 1):
    if abs(A - B) % 2 == 0:
        print("NO")
        exit()

if A >= B:
    A_after_T = max(MIN, A-V*T)
    B_after_T = max(MIN, B-W*T)
    if A_after_T <= B_after_T:
        print("YES")
    else:
        print("NO")
else:
    A_after_T = min(MAX, A+V*T)
    B_after_T = min(MAX, B+W*T)
    if A_after_T >= B_after_T:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

d = b - a
d = int(d)
dv = v - w
dv = int(dv)
d = abs(d)
if dv != 0 and abs(d) % abs(dv) == 0 and abs(d) <= abs(dv) * T and dv > 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:

a_par = list(map(int, input().rsplit())) 
b_par = list(map(int, input().rsplit()))
sec = int(input())

num = 0

for i in range(sec + 1):
    if a_par[0] + a_par[1] * i == b_par[0] + b_par[1] * i:
        num += 1

if num > 0:
    print("YES")
else:
    print("NO")