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:
#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(int,input().split(" ")))
B,W = list(map(int,input().split(" ")))
t = int(input())
flag = 0
while t>0:
	A = A+V
	B = B+W
	if A == B:
		flag = 1
		prient("YES")
		break
	t = t - 1
if flag == 0:
	print("NO")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
input = stdin.readline
 
A,V = input().rstrip().split()
B,W = input().rstrip().split()
T = int(input().rstrip())
s=0
for t in range(T):
  if B<A:
    A-=V
    B-=W
    if B>=A:
      print('Yes')
      s=1
      break
  else:
    A+=V
    B+=W
    if B<=A:
      print('Yes')
      s=1
      break
 
if s!=1:
  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-M>0:
    ArriveTime = (A-B)/(V-M)
else:
    ArriveTime = 10000000000

if T >= ArriveTime:
    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()

move_a = v * t + a
move_b = w * t + b

if move_a >= move_b:
    print("YES")
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 = map(int, input().split())
b, w = map(int, input().split())

t = int(input())


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


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

Submission status: Runtime Error

Solution code:
from sys import stdin
input = stdin.readline
 
A,V = input().rstrip().split()
B,W = input().rstrip().split()
T = input().rstrip()
s=0
for t in range(T):
  if B<A:
    A-=V
    B-=W
    if B>=A:
      print('Yes')
      s=1
      break
  else:
    A+=V
    B+=W
    if B<=A:
      print('Yes')
      s=1
      break
 
if s!=1:
  print('No')

Submission status: Runtime Error

Solution code:
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: Runtime Error

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

ans = "NO"

if(A<B):
    if(A+V*T >= B+W*T):
        ans = "YES"
elif(A>B):
    if(A+(-1)*V*T =< B+(-1)*W*T):
        ans = "YES"
print(ans)

Submission status: Runtime Error

Solution code:
a, a_v = map(int, input().split())
b, b_v = map(int, input().split())
t = int(input())
flag=0
t_set = 0

if a-b==0 and a_v-b_v == 0:
  flag = 1
elif a-b==0 or a_v-b_v == 0:
  flag = 0
else:
  t_set = (a-b)/(b_v - a_v)

if t_set>0:
    if int(t_set)==0:
      	flag = 1
	elif 0<t_set and t_set<=t:
  		flag = 1
	else:
  		flag = 0
        
if flag == 0:
  print('No')
else:
  print('Yes')

Submission status: Runtime Error

Solution code:
D = []
A = int(input(""))
V = int(input(""))
B = int(input(""))
W = int(input(""))
T = int(input(""))
if -10 ^ 9 <= A <= 10 ^ 9 and -10 ^ 9 <= B <= 10 ^ 9:
    if 1 <= V <= 10 ^ 9 and 1 <= A <= 10 ^ 9:
        if 1 <= T <= 10 ^ 9:
            D.append(A)
            D.append(V)
            D.append(B)
            D.append(W)
            D.append(T)
            if A in 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())

if (A - B) / (V - W) < T:
    print("YES")
    exit()

print("NO")

Submission status: Runtime Error

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

A,V = input().rstrip().split()
B,W = input().rstrip().split()
T = input().rstrip()
s=0
for t in range(T):
  if B<A:
    A-=V
    B-=W
    if B>=A:
      print('Yes')
      s=1
      break
  else:
    A+=V
    B+=W
    if B<=A:
      print('Yes')
      s=1
      break

if s!=1:
  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 (B-A) <= T * (V-W):
                print("Yes")
                exit()
            else:
                print("No")
                exit()
    elif A > B:
        if V <= W:
            print("No")
            exit()
        else:
            if (A-B) <= T * (V-W)
                print("Yes")
                exit()
            else:
                print("No")
                eixt()

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

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

            print("YES" if ans==1 else "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:
    print("NO")

else:
    T = (a-b) / (w-b)
    if T.is_integer() == True:
        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())
check=0
if (V>W) & (abs(A-B) / (V-W) <= T) & (abs(A-B) % (V-W) == 0):
    check=1
else:
    for i in range(T):
        if B>A:
            B=B+W
            A=A+V
        elif B<A:
            B=B-W
            A=A-V
        if A==B:
            check=1
            break
if check==1:
    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 b > a:
  ans = t + 1
else: 
  ans = (b - a) / (v - w)


if t >= ans:
  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())
for k in range(1, T+1):
    a=A+(V*k)
    b=B+(W*k)
    if (a == b):
        break
    else:
        print('NO')
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())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if abs(a) > abs(b):
    mostabs = abs(a)
else:
    mostabs = abs(b)

if a < 0 or b < 0:
    a += mostabs
    b += mostabs


# 鬼と逃げる人がぶつかる場所
meetingplace = int(lcm(a, b) + lcm(v, w))

requiredtime = int((meetingplace - v) / a)

if v > w:
    if t >= requiredtime:
        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())
S=V-W
time=(A-B)/S
if S <=0:
   print("NO")
elif 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())
v=V-W
l=B-A
if A+V*T > B+W*T:
  if l%v==0:
    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())
    a = list(range(A, A+V*T, V))
    b = list(range(B, B+W*T, W))
    if len(set(a) & set(b)) == 0:
        print('NO')
        exit(0)
    for i in range(T):
        if a[i] == b[i]:
            print('YES')
            exit(0)
        elif a[i] > b[i]:
            print('NO')
            exit(0)
main()

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.is_integer()==True:
        t = int(t)
        if t > 0:
            if t<=T:
                out = 'YES'
    
    print(out)
main()

Submission status: Runtime Error

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: Runtime Error

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:
      if 
    else:
      result = "NO"
  else:
    result = "NO"
print(result)

Submission status: Runtime Error

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

move_a = int(k[1]) * int(t) + int(k[0])
move_b = int(k[3]) * int(t) + int(k[2])

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

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = int(input())
aw = a[0]+a[1]*t
bw = b[0]+b[1]*t
diff = a[1]-b[1] # 1秒ごとに縮まる
adiff = b[0] - a[0] # 元々の差
count = 0
if int(adiff/diff) <= 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 b == 
    a += 10**9
    b += 10**9
    if v == w:
        print('NO')
        return 0
#    if a > b:
#        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: Runtime Error

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

if v == w:
  print('NO')
  exit()
elif (a > b) and (v >= m):
  print('NO')
  exit()
  
for i in range(1,t+1):
  oni = a+(v*i)
  child = c+(w*i)
  if oni >= child:
    print('YES')
    break
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(A-B) =< V*T-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=int(input())
flag=0
if b==a:
    flag=1
elif (v-w)<0:
    pass
elif a>b:
    pass
elif abs((b-a)/(v-w))<=t:
    flag=1
if flag==1:
    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())
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: 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())
D = abs(A-B)
S = V-W
T1 = float(D/S)
if S>0 and T1 <= 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())

ans ='NO'
if abs(B-A)%(V-W) ==0:
    t = abs(B-A)//(V-W)
    if t <= T:
        ans = 'YES'


print(ans)

Submission status: Runtime Error

Solution code:
from sys import stdin
A,V = [int(x) for x in stdin.readline().rstrip().split()]
B,W = [int(x) for x in stdin.readline().rstrip().split()]
T = int(stdin.readline().rstrip())

X = W - V
    
if X == 0:
    print("NO")
    
elif abs(a-b) % W != 0:
    print("NO")

elif A >= B and W >= V:
    X = W - V
    C = abs(A - B)

    if C % X == 0:
        if X*T >= C:
            print("YES")
        else:
            print("NO")
                
    else:
        print("NO")
        
elif B >= A and V >= W:
    X = V-W
    C = abs(B-A)
    if C % X == 0:
        if X*T >= C:
            print("YES")
        else:
            print("NO")
                
    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())

if A - B == 0 and 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: Runtime Error

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

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

result = False


# a--->b 
try:
    if b > a:
        time = (b-a)/(v-w)
    else:
        time = (b-a)/(w-v)
except:
    result = False

if time.is_integer():
    result = True

if time > t:
    result = False

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())

def check():
  if (W-V)>=0 and B>A:
     return 'NO'
  if T>(B-A)//(V-W):
     return 'YES'
  else:
     return 'NO'
    
print(check())

Submission status: Runtime Error

Solution code:
A=int(input())
V=int(input())
B=int(input())
W=int(input())
T=int(input())
for k in range(1, T+1):
    a=A+(V*k)
    b=B+(W*k)
    if (a == b):
        print('YES')
    else:
        break
print('NO')

Submission status: Runtime Error

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

if W > V:
    print("NO")
    exit()

if A<B:
    t = int((B-A)/(V-W))-1
else:
    t = int((B-A)/(W-V))-1

for _ in range(t,T):
    if A < B:
        if A + V == B + W:
            print("YES")
            exit()
        else:
            A = A + V
            B = B + W
    else:
        if A - V == B - W:
            print("YES")
            exit()
        else:
            A = A - V
            B = B - W
print("NO")

Submission status: Runtime Error

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

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: Runtime Error

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

if v == w or v < w:
    c = 10**20

if v > w and v != w:
    if a > 0 and b > 0:
        c = abs(b - a)/ abs(v-w)
    if a < 0 and b > 0:
        c = abs(b - a)/ abs(v-w)        
    if a <0 and b < 0:
        c = abs(abs(b) - abs(a))/ abs(v-w)
    if a > 0 and b < 0:
        c = 10**20
    if a == b:
        c = 10**20
if int(c) <= 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())
  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)

  if v - w < 0: 
    ans  = False
  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,V = int(input()).split(" ")
B,W = 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
if flag == 0:
	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())

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

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

Submission status: Runtime Error

Solution code:
if (V*T)+A < (W*T)+B:
  print('NO')

tt =T/2
if tt%2 != 0:
    tt += 0.5

tt = int(tt)

for i in range(1,tt):
  if tt*V+A < tt*W+B:
    break
  if V*i+A >= W*i+B:
    print('YES')
    exit()

for i in range(tt,T):
  if V*i+A >= W*i+B:
    print('YES')
    exit()

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")
else:
	z = (b-a)/(v-w)
	if z==int(z) and z<=t:print("YES")
	else:print("NO")

Submission status: Runtime Error

Solution code:
import numpy as np

a0,v = map(int, input().split())

b0,w = map(int, input().split())

t0 = int(input())

a = np.zeros(t0)
b = np.zeros(t0)

a[0] = a0
b[0] = b0

i = 0
tag = False
while i < t0-1:
    if b[i] == a[i]:
        tag = True
        break
    elif b[i]>a[i]:
        a[i+1] = a[i] + v
        b[i+1] = b[i] + w
        i += 1
    else:
        a[i+1] = a[i] - v
        b[i+1] = b[i] - w
        i += 1
        
if tag or b[t0-1] == a[t0-1]:
    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 v != w:
    if a > 0 and b > 0:
        c = abs(b - a)/ abs(v-w)
    if a < 0 and b > 0:
        c = abs(b - a)/ abs(v-w)        
    if a <0 and b < 0:
        c = abs(abs(b) - abs(a))/ abs(v-w)
    if a > 0 and b < 0:
        c = 10**20
    if a == b:
        c = 10**20
else:
    c = 10**20
if int(c) <= 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())

res1 = a + v*t
res2 = b + w*t

if res1 >= res2:
  if (b-a)%(v-w) == 0:
    print('YES')
  else:
    print('NO')
else:
  print('NO')

Submission status: Runtime Error

Solution code:
D = []
A = int(input(""))
V = int(input(""))
B = int(input(""))
W = int(input(""))
T = int(input(""))
D.append(A)
D.append(V)
D.append(B)
D.append(W)
D.append(T)
if A in D:
    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())
for k in range(1, T+1):
    a=A+(V*k)
    b=B+(W*k)
    if (a == b):
        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) >= 1:
    child = abs(b-a)
else:
    child = abs(a) + abs(b)

try:
    n = child/(v-w)
except ZeroDivisionError:
    n = -1
if n.is_integer() and n>=0 and n <= 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())
  ans = True
  vect = v - w
  if vect <= 0:
    ans = False
  else:
    if vect * t > abs(a - b):
      ans = True
    else:
      if (a + w * t > 10 ** 9 and b + v * t > 10 ** 9 and b > a):
        ans = True
      elif (a - w * t < -10 ** 9 and b - v * t < 10 ** 9 and b < a):
        ans = True
      else:
        ans = False
  if ans:
    print("YES")
  else:
    print("NO")   
            

main()

Submission status: Runtime Error

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:
  if L % (V - W) == 0 and L // (V - W) <= T:
      print('YES')
      break
    else:
      print('NO')
      break

Submission status: Runtime Error

Solution code:
import numpy as np

a0,v = map(int, input().split())

b0,w = map(int, input().split())

t0 = int(input())

a = np.zeros(t0)
b = np.zeros(t0)

a[0] = a0
b[0] = b0

i = 0
tag = False
while i < t0-1:
    if b[i] == a[i]:
        print(i)
        tag = True
        break
    elif b[i]>a[i]:
        print(i)
        a[i+1] = a[i] + v
        b[i+1] = b[i] + w
        i += 1
    else:
        print(i)
        a[i+1] = a[i] - v
        b[i+1] = b[i] - w
        i += 1
        
if tag or b[t0-1] == a[t0-1]:
    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:
    print("NO")
else:
    if abs(b-a)<=(v-w):
    if abs(b-a)%(v-w)==0 and abs(b-a)//(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()
T = int(t)

d = b - a
d = int(d)
dv = v - w
dv = int(dv)
d = abs(d)
if abs(d) % abs(dv) == 0 and abs(d) <= int(dv) * 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())
d = abs(a-b)
s = v - w
if s > 0 d/s <= 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())
  ans = True
  vect = v - w
  if vect <= 0:
    ans = False
  else:
    if vect * t > abs(a - b):
      ans = True
    else:
      if (a + w * t > 10 ** 9 and b + v * t > 10 ** 9 and b > a):
        ans = True
      elif (a - w * t < -10 ** 9 and b - v * t < 10 ** 9 and b < a):
        ans = True
      else:
        ans = False
  if ans:
    print("YES")
  else:
    print("NO")   
            


main()

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")
else:
    if abs(b-a)<=(v-w)
    if abs(b-a)%(v-w)==0 and abs(b-a)//(v-w)<=t:
        print("YES")
    else:
        print("NO")

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=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:
list = []
A = int(input(""))
V = int(input(""))
B = int(input(""))
W = int(input(""))
T = int(input(""))
list.append(A)
list.append(V)
list.append(B)
list.append(W)
list.append(T)
if A in list:
    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()
if B>=A:
    print("YES" if A+V*T>=B+W*T else "NO")
else:
    print("YES" if B-W*T>=A-V*T else "NO")

Submission status: Runtime Error

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

    print('YES' if l<=s*t else 'NO')

Submission status: Runtime Error

Solution code:
import numpy as np

a0,v = map(int, input().split())

b0,w = map(int, input().split())

t0 = int(input())

a = np.zeros(t0)
b = np.zeros(t0)

a[0] = a0
b[0] = b0

i = 0
tag = False
while i < t0-1:
    if b[i] == a[i]:
        print(i)
        tag = True
        break
    elif b[i]>a[i]:
        print(i)
        a[i+1] = a[i] + v
        b[i+1] = b[i] + w
        i += 1
    else:
        print(i)
        a[i+1] = a[i] - v
        b[i+1] = b[i] - w
        i += 1
        
if tag or b[t0-1] == a[t0-1]:
    print('YES')
else:
    print('NO')

Submission status: Runtime Error

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

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

result = False

try:
    time = (b-a)/(v-w)
except:
    result = False

if time.is_integer():
    result = True

if time > t:
    result = False

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
[A,V]=[int(i) for i in input().split()]
[B,W]=[int(i) for i in input().split()]
T=int(input())
if abs(A-B)=>T*abs(V-W):print("NO")
else:print("YES")

Submission status: Runtime Error

Solution code:
A=int(input())
V=int(input())
B=int(input())
W=int(input())
T=int(input())
for k in range(1, T+1):
    a=A+(V*k)
    b=B+(W*k)
    if (a == b):
        print('YES')
    else:
        pass

Submission status: Runtime Error

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

if W>=V and A!=B:
    print('NO')
    exit(0)

if A*B<0:
    if (abs(A)+abs(B))//(V-W)<=T:
        print('YES')
    else:
        print('NO')
else
    if abs(abs(A)-abs(B))//(V-W)<=T:
        print('YES')
    else:
        print('NO')

Submission status: Runtime Error

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(v+w))%1 == 0 and t >= abs(a-b)/(v+w) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
        else:
            if ((b-a)/(w-v))%1 == 0 and t >= ((b-a)/(w-v)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
        else:
            if ((a-b)/(v-w))%1 == 0 and t >= ((a-b)/(v-w)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    a, v = mput()
    b, w = mput()
    t = iput()
    bit = 0
    if a == b:
        bit = 1
    elif (abs(a-b)/(v+w))%1 == 0 and t >= abs(a-b)/(v+w) >= 0:
        bit = 1
    elif b > a:
        if v > w:
            if ((b-a)/(v-w))%1 == 0 and t >= ((b-a)/(v-w)) >= 0:
                bit = 1
        if v > w:
            if ((b-a)/(w-v))%1 == 0 and t >= ((b-a)/(w-v)) >= 0:
                bit = 1
    else:
        if w > v:
            if ((a-b)/(w-v))%1 == 0 and t >= ((a-b)/(w-v)) >= 0:
                bit = 1
        else:
            if ((a-b)/(v-w))%1 == 0 and t >= ((a-b)/(v-w)) >= 0:
                bit = 1
    if bit == 1:
        print("YES")
    else:
        print("NO")
    return 0

if __name__ == "__main__":
    solve()

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 isinstance(t, int):
        if t<=T:
            out = 'YES'
        
    print(out)
main()

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')
if w > v: print('NO')
if (b-a)/(v-w) < t:
    print('YES')
else:
    print('NO')