ZhenlongDai/ACPR huggingface dataset:
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K =list(map(int,input().split()))

def check():
    for i in range(N):
        for j in range(M):
            if i*(M)+j*N - 2* i*j == K:
                return True
    return False


print("Yes" if check() else "No")

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M,K =list(map(int,input().split()))

def check():
    for i in range(N+1):
        for j in range(M+1):
            if i*(M)+j*N - 2* i*j == K:
                return True
    return False


print("Yes" if check() else "No")

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m, k = map(int, input().split())
l = []
for i in range(1,n+1):
    for j in range(1,m+1):
        l.append(i*m + j*n -2*i*j)



if k in l:
    print("Yes")
else:
    print("No")


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m, k = map(int, input().split())
l = []
for i in range(n+1):
    for j in range(m+1):
        l.append(i*m + j*n -2*i*j)



if k in l:
    print("Yes")
else:
    print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, k = map(int, input().split())

for i in range(n):
    for j in range(m):
        if i * (m - j) + j * (n - i) == k:
            print("Yes")
            exit()

print("No") 

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m, k = map(int, input().split())

for i in range(n + 1):
    for j in range(m + 1):
        if i * (m - j) + j * (n - i) == k:
            print("Yes")
            exit()

print("No")

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for i in range(n):
    for j in range(m):
        if i*(m-j)+(n-i)*j==k:
            break
    else:
        continue
    break
else:
    print('No')
    exit()
print('Yes')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k=map(int,input().split())
for i in range(n+1):
    for j in range(m+1):
        if i*(m-j)+(n-i)*j==k:
            break
    else:
        continue
    break
else:
    print('No')
    exit()
print('Yes')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k=[int(i) for i in input().split()]
def main():
    for i in range(n+1):
        for j in range(m+1):
            if j*(m-i)+i*(n-j)==k:
                print("Yes")
                return
    print("No")
main()

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k=[int(i) for i in input().split()]
def main():
    for i in range(n+1):
        for j in range(m+1):
            if i*(m-j)+j*(n-i)==k:
                print("Yes")
                return
    print("No")
main()
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, k = map(int, input().split())
l = lambda a, b: a * m + b * n - 2 * a * b
for n_ in range(1, n+1):
    for m_ in range(1, m+1):
        if l(n_, m_) == k:
            print("Yes")
            exit()
print("No")

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m, k = map(int, input().split())
l = lambda a, b: a * m + b * n - 2 * a * b
for n_ in range(n+1):
    for m_ in range(m+1):
        if l(n_, m_) == k:
            print("Yes")
            exit()
print("No")

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k=[int(i) for i in input().split()]
for i in range(n):
    for j in range(m):
        if i*(m-j)+j*(n-i)==k:
            print("Yes")
            break
else:
    print("No")

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
n,m,k=[int(i) for i in input().split()]
def main():
    for i in range(n+1):
        for j in range(m+1):
            if i*(m-j)+j*(n-i)==k:
                print("Yes")
                return
    print("No")
main()

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())
ans = False

for i in range(N):
    for j in range(M):
        if i*(M-j)+j*(N-i) == K:
            ans = True

if ans:
    print("Yes")
else:
    print("No")

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())
ans = False

for i in range(N+1):
    for j in range(M+1):
        if i*(M-j)+j*(N-i) == K:
            ans = True

if ans:
    print("Yes")
else:
    print("No")

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
n, m, k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        if i*(n-j)+(m-i)*j == k:
            print('Yes')
            sys.exit()
print('No')


Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
n, m, k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        if i*(m-j)+(n-i)*j == k:
            print('Yes')
            sys.exit()
print('No')

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, M, K = map(int, input().split())

isok = False
for x in range(M+1):
    for y in range(N+1):
        if x*(M-y)+y*(N-x) == K:
            isok = True
            break

print('Yes' if isok else 'No')

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())

isok = False
for x in range(N+1):
    for y in range(M+1):
        if x*(M-y)+y*(N-x) == K:
            isok = True
            break

print('Yes' if isok else 'No')
Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
(N,M,K) = map(int,input().split())

for i in range(N+1):
    for j in range(M+1):
        if i*(N-j)+j*(M-i) == K:
            print('Yes')
            flag = 1
            break
        else:
            flag = 0
    if flag == 1:
        break
else:
    print("No")

Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
(N,M,K) = map(int,input().split())

for i in range(N+1):
    for j in range(M+1):
        if i*(M-j)+j*(N-i) == K:
            print('Yes')
            flag = 1
            break
        else:
            flag = 0
    if flag == 1:
        break
else:
    print("No")

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
n, m, k = map(int, input().split())

for i in range(n):
    for j in range(n):
        if i*(m-j)+(n-i)*j == k:
            print('Yes')
            sys.exit()
print('No')


Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
n, m, k = map(int, input().split())

for i in range(n+1):
    for j in range(m+1):
        if i*(m-j)+(n-i)*j == k:
            print('Yes')
            sys.exit()
print('No')

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m, k = map(int, input().split())


for i in range(n):
  for j in range(m):
    a = n+m-2 +(m-2)*i + (n-2)*j
    if a == k:
      print('Yes')
      exit()
print('No')

Failing test case input:
7 17 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m, k = map(int, input().split())

for i in range(n+1):
  for j in range(m+1):
    a = m*i + n*j - 2*i*j
    if a == k:
      print('Yes')
      exit()
print('No')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k=map(int,input().split())
for a in range(n):
    for b in range(m):
        if b*n+a*m-2*a*b==k:
            print('Yes')
            break
    else:
        continue
    break
else:
    print('No')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k=map(int,input().split())
for a in range(n+1):
    for b in range(m+1):
        if b*n+a*m-2*a*b==k:
            print('Yes')
            break
    else:
        continue
    break
else:
    print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M, K = map(int, input().split())
flag = 0
for i in range(N+1):
  for j in range(M+1):
    if (N-i)*(M-j) == K:
      flag = 1
if flag == 1:
  print("Yes")
else:
  print("No")

Failing test case input:
7 9 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N, M, K = map(int, input().split())
flag = 0
for i in range(N+1):
  for j in range(M+1):
    if (N-i)*j + i*(M-j) == K:
      flag = 1
if flag == 1:
  print("Yes")
else:
  print("No")
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
    N, M, K = list(map(int, input().split()))

    ans = "No"
    for km in range(0, N + 1):
        for kn in range(0, M + 1):
            
            if M * kn + N * km - 2 * (km * kn) == K:
                ans = "Yes"

    print(ans)


Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
if __name__ == '__main__':
    N, M, K = list(map(int, input().split()))

    ans = "No"
    for kn in range(0, N + 1):
        for km in range(0, M + 1):
            
            if M * kn + N * km - 2 * (km * kn) == K:
                ans = "Yes"

    print(ans)

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m, k = list(map(int, input().split()))
for i in range(n+1):
    for j in range(m+1):
        if n*i + j*m - 2*(i*j) == k:
            print('Yes')
            exit()
print('No')


Failing test case input:
0 3 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n, m, k = list(map(int, input().split()))
for i in range(n+1):
    for j in range(m+1):
        if m*i + n*j - 2*(i*j) == k:
            print('Yes')
            exit()
print('No')

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n,m,k=map(int,input().split())
ans=['Yes','No']
i=1
for a in range(n+1):
    for b in range(m+1):
        if k==a*m+b*n-a*b:
            i=0
print(ans[i])

Failing test case input:
3 5 8

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k=map(int,input().split())
ans=['Yes','No']
i=1
for a in range(n+1):
    for b in range(m+1):
        if k==a*m+b*n-2*a*b:
            i=0
print(ans[i])

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,K = map(int,input().split())
ans = "No"

for k in range(n):
    for l in range(m):
        if k*(m-l)+(n-k)*l == K: 
            ans = "Yes"  
            break

print(ans)

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,K = map(int,input().split())
ans = "No"

for k in range(0,n+1):
    for l in range(0,m+1):
        if k*(m-l)+(n-k)*l == K: 
            ans = "Yes"  
            break

print(ans)

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k = map(int, input().split())

for i in range(n+1):
  for j in range(m+1):
    if i*(m-j)+j*(n-1)==k:
      print("Yes")
      exit()
print("No")

Failing test case input:
7 9 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n,m,k = map(int, input().split())

for i in range(n+1):
  for j in range(m+1):
    if i*(m-j)+j*(n-i)==k:
      print("Yes")
      exit()
print("No")
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())

for i in range(1,n+1):
    for j in range(1,m+1):
        black=i*m+j*n-2*i*j
        if black==k:
            print('Yes')
            exit()
print('No')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k=map(int,input().split())

for i in range(n+1):
    for j in range(m+1):
        black=i*m+j*n-2*i*j
        if black==k:
            print('Yes')
            exit()
print('No')

Problem: p03592
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,M,K=MI()
    flag=0
    
    for i in range(N):
        for j in range(M):
            temp=i*M+j*N-(i*j)*2
            if temp==K:
                flag=1
                break
            
            
    if flag:
        print("Yes")
    else:
        print("No")

main()


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,M,K=MI()
    flag=0
    
    for i in range(N+1):
        for j in range(M+1):
            temp=i*M+j*N-(i*j)*2
            if temp==K:
                flag=1
                break
            
            
    if flag:
        print("Yes")
    else:
        print("No")

main()

Problem: p03592
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):

import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


N, M, K = LI()

for i in range(N):
    for j in range(M):
        if i*(M-j) + j*(N-i) == K:
            print('Yes')
            exit()

print('No')


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):

import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


N, M, K = LI()

for i in range(N+1):
    for j in range(M+1):
        if i*(M-j) + j*(N-i) == K:
            print('Yes')
            exit()

print('No')
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m,k=map(int,input().split())
ans=0
for i in range (n):
    for j in range(m):
        if i*m+j*n-i*j*2==k:
            ans=1
            break
if ans==1:
    print("Yes")
else:
    print("No")


Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n,m,k=map(int,input().split())
ans=0
for i in range (n+1):
    for j in range(m+1):
        if i*m+j*n-i*j*2==k:
            ans=1
            break
if ans==1:
    print("Yes")
else:
    print("No")

Problem: p03592
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

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

ans = set()
for i in range(n+1):
    for j in range(m+1):
        ans.add(i*j+(n-i)*(n-j))
if k in ans:
    print("Yes")
else:
    print("No")

Failing test case input:
7 9 12

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

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

ans = set()
for i in range(n+1):
    for j in range(m+1):
        ans.add(i*j+(n-i)*(m-j))
if k in ans:
    print("Yes")
else:
    print("No")

Problem: p03592
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, M, K = LI()

    ans = 'No'
    for i, j in itertools.product(range(N), range(M)):
        if i * j + (N - i) * (M - j) == K:
            ans = 'Yes'
            break

    print(ans)

if __name__ == '__main__':
    resolve()


Failing test case input:
4 2 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, M, K = LI()

    ans = 'No'
    for i, j in itertools.product(range(N + 1), range(M + 1)):
        if i * j + (N - i) * (M - j) == K:
            ans = 'Yes'
            break

    print(ans)

if __name__ == '__main__':
    resolve()
Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m, k = map(int, input().split())

cant = True
for i in range(n+1):
    for j in range(m+1):
        if n*i+m*j-2*i*j==k: cant = False
print("YNeos"[cant::2])

Failing test case input:
1 21 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
n, m, k = map(int, input().split())

cant = True
for i in range(n+1):
    for j in range(m+1):
        if m*i+n*j-2*i*j==k: cant = False
print("YNeos"[cant::2])

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
inputs = input().split()
N = int(inputs[0])
M = int(inputs[1])
K = int(inputs[2])
a = [[0 for y in range(M)] for x in range(N)]

flag = False

for i in range(N):
    for j in range(M):
        if M*i + N*j - (j)*(i)*2 == K:
            flag = True

if flag:
    print('Yes')
else:
    print('No')

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
inputs = input().split()
N = int(inputs[0])
M = int(inputs[1])
K = int(inputs[2])
a = [[0 for y in range(M)] for x in range(N)]

flag = False

for i in range(N + 1):
    for j in range(M + 1):
        if M*i + N*j - (j)*(i)*2 == K:
            flag = True

if flag or (N == 1 and M == 1):
    print('Yes')
else:
    print('No')

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M,K = map(int,input().split())
ans = 'No'
for n in range(N):
    for m in range(M):
        tmp = ((N-n)*m + (M-m)*n)
        if tmp==K:
            ans = 'Yes'
print(ans)

Failing test case input:
1 5 5

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N,M,K = map(int,input().split())
ans = 'No'
for n in range(N+1):
    for m in range(M+1):
        tmp = ((N-n)*m + (M-m)*n)
        if tmp==K:
            ans = 'Yes'
print(ans)

Problem: p03592
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,k=map(int,input().split())
c=[]
for s in range(a+1):
    for t in range(b+1):
        c.append((a-t)*s+(b-s)*t)
print(["No","Yes"][k in c])


Failing test case input:
1 34 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,k=map(int,input().split())
for s in range(a+1):
    for t in range(b+1):
        if k==(b-t)*s+(a-s)*t:
            print("Yes")
            exit()
print("No")
Problem: p02343
Buggy submission (Python3, verdict: Wrong Answer):
n, nq = map(int, input().split())
set_list = list(range(n))

def find(n):
    global set_list
    if set_list[n] == n:
        return n
    result = set_list[n] = find(set_list[n])
    return result

def same(x, y):
    set_list[find(y)] = find(x)

def unite(x, y):
    return find(x) == find(y)

for _ in range(nq):
    com,x,y = map(int, input().split())
    if com == 0:
        same(x, y)
    else:
        if unite(x, y):
            print(0)
        else:
            print(1)



Failing test case input:
5 12
0 1 4
0 2 3
1 1 2
0 3 4
1 2 4
1 2 2
0 1 3
0 2 4
1 3 0
0 1 4
1 0 2
1 3 0

Expected output:
0
1
1
0
0
0


Actual output:
1
0
0
1
1
1


Fixed submission (verdict: Accepted):
n, nq = map(int, input().split())
set_list = list(range(n))

def find(n):
    global set_list
    if set_list[n] == n:
        return n
    result = set_list[n] = find(set_list[n])
    return result

def same(x, y):
    set_list[find(y)] = find(x)

def unite(x, y):
    return find(x) == find(y)

for _ in range(nq):
    com,x,y = map(int, input().split())
    if com == 0:
        same(x, y)
    else:
        if unite(x, y):
            print(1)
        else:
            print(0)

Problem: p02343
Buggy submission (Python3, verdict: Wrong Answer):
n, q = map(int, input().split())

s =[set([i]) for i in range(n)]
p =[i for i in range(n)]

for i in range(q):
    com, x, y = map(int, input().split())
    if com:
        if y in s[p[x]]: print(1)
        else: print(0)
    else:
        s[p[x]] = s[p[x]] | s[p[y]]
        for j in range(n):
            if p[j] == p[y]: p[j] = p[x]

Failing test case input:
9 12
0 1 4
0 1 3
1 1 1
0 3 4
1 4 4
1 2 2
0 1 3
1 2 1
1 2 0
0 1 4
0 0 1
1 3 0

Expected output:
1
1
1
0
0
1


Actual output:
1
1
1
0
0
0


Fixed submission (verdict: Accepted):
def find(x):
    global s
    if s[x] == x:
        return x
    s[x] = find(s[x])
    return s[x]

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

s =[i for i in range(n)]

for i in range(q):
    com, x, y = map(int, input().split())
    if com:
        if find(x) == find(y): print(1)
        else: print(0)
    else:
        s[find(y)] = find(x)
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
lst = sorted([a,b,c])
if(lst[1] - lst[0] <= d and lst[2] - lst[1] <= d):
    print("Yes")
else:
    if(a-c < d and c-a < d):
        print("Yes")
    else:
        print("No")

Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
lst = sorted([a,b,c])
if(lst[1] - lst[0] <= d and lst[2] - lst[1] <= d):
    print("Yes")
else:
    if(a-c <= d and c-a <= d):
        print("Yes")
    else:
        print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

print(abs(a-b))
if (abs(a-b) <= d and abs(b-c) <= d) or abs(a-c) <= d:
    print("Yes")
else:
    print("No")

Failing test case input:
-1 101 0 24

Expected output:
Yes


Actual output:
102
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

if (abs(a-b) <= d and abs(b-c) <= d) or abs(a-c) <= d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
print('YNeos'[abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d)::2])

Failing test case input:
-1 101 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
print('NYoe s'[abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d)::2])

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if b-a<=d and c-b<=d:
	print('Yes')
else:
	print('No')

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if (abs(b-a)<=d and abs(c-b)<=d) or abs(c-a)<=d:
	print("Yes")
else:
	print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

if abs(a-c)<=d:
    print("yes")
else:
    if abs(a-b)<=d and abs(b-c)<=d:
        print("yes")
    else:
        print("no")


Failing test case input:
0 011 2 81

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())

if abs(a-c)<=d:
    print("Yes")
else:
    if abs(a-b)<=d and abs(b-c)<=d:
        print("Yes")
    else:
        print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = [int(i) for i in input().split()]

if (a-c) <= d:
    print('Yes')
elif (a-b) <= d and (b-c) <= d:
    print('Yes')
else:
    print('No')

Failing test case input:
0 111 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = [int(i) for i in input().split()]

if abs(a-c) <= d:
    print('Yes')
elif abs(a-b) <= d and abs(b-c) <= d:
    print('Yes')
else:
    print('No')
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(c-a)<=d:
    print('Yes')
elif abs(b-a)+abs(c-b)<=d:
    print('Yes')
else :
    print('No')

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(c-a)<=d:
    print('Yes')
elif abs(b-a)<=d and abs(c-b)<=d:
    print('Yes')
else :
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,D=map(int,input().split(' '))
if abs(A-C) <= D or ((abs(B-A)) <= D and abs(B-D)<=D):
    print('Yes')
else:
    print('No')

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
A,B,C,D=map(int,input().split(' '))
if abs(A-C) <= D or ((abs(B-A)) <= D and abs(B-C)<=D):
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split());print("Yes") if abs(a-b)<=d and abs(c-b)<=d else print("No")

Failing test case input:
-1 101 3 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split());print("Yes") if (abs(b-a)<=d and abs(c-b)<=d) or (abs(a-c)<=d) else print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if abs(c - a) >= 0:
    print("Yes")
elif abs(b - a) >= 0 and abs(c - b) >= 0:
    print("Yes")
else:
    print("No")

Failing test case input:
100 10 0 4

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(a - c) <= d:
    print('Yes')
elif abs(a - b ) <= d and abs(b - c) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if abs(a-b)<=d and abs(c-b)<=d:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 111 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if abs(a-b)<=d and abs(c-b)<=d:
    print('Yes')
elif abs(a-c)<=d:
    print('Yes')
else:    
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d= map(int,input().split())
if abs(c-a)<=d:print('Yes')
else:print('No')

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d= map(int,input().split())
if abs(c-a)<=d or abs(a - b) <= d and abs(b - c) <= d:print('Yes')
else:print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if b-a <= d or c-b <= d:
    print("Yes")
else:
    print("No")

Failing test case input:
3 001 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(c-a) <= d or (abs(c-b) <= d and abs(b-a) <=d):
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if( (abs(a-c)>d and abs(a-b)>d) or ( abs(a-c)>d and abs(b-c)>d ) ) :
    print('no')
else :
    print('yes')

Failing test case input:
1 101 1 1

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if( (abs(a-c)<=d) or (abs(a-b)<=d and abs(b-c)<=d ) ) :
    print('Yes')
else :
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if abs(a - c) <= d or (abs(a - b) <= d and abs(b - c)) <= d:
    print("Yes")
else:
    print("No")


Failing test case input:
0 111 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

if abs(a - c) <= d or (abs(a - b) <= d and abs(b - c) <= d):
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
c = arr[2]
d = arr[3]


if b - a <= d and c - b <= d:
    print('Yes')
else:
    print('No')


Failing test case input:
-2 111 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
c = arr[2]
d = arr[3]


if (abs(b - a) <= d and abs(c - b) <= d) or abs(a-c) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = list(map(int,input().split()))
if abs(a-b)<=d and abs(b-c)<=d:
    print("Yes")
else:
    print("No")

Failing test case input:
-2 111 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = list(map(int,input().split()))
if abs(a-b)<=d and abs(b-c)<=d or abs(a-c)<=d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
tmp=input().split()
a=int(tmp[0])
b=int(tmp[1])
c=int(tmp[2])
d=int(tmp[3])
ta=b-a
tb=c-b
tc=c-a
if(ta<0):
    ta=-ta
if(tb<0):
    tb=-tb
if(tc<0):
    tc=-tc
if tc<=d or ta<=d and tb<=d:
    print('Yes')
    sys.exit()
print('NO')


Failing test case input:
5 111 1 -1

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
import sys
tmp=input().split()
a=int(tmp[0])
b=int(tmp[1])
c=int(tmp[2])
d=int(tmp[3])
da=a-b
db=b-c
dc=c-a
if a-b<0:
    da=b-a
if b-c<0:
    db=c-b
if c-a<0:
    dc=a-c
if dc<=d or da<=d and db<=d:
    print('Yes')
    sys.exit()
print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x = map(int, input().split())
if a - c <= 0:
  print("Yes") if c - a <= 2 * x else print("No")
elif c - a <= 0:
  print("Yes") if a-c <= 2*x else print("No")

Failing test case input:
0 011 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, x = map(int, input().split())
if abs(a - c) <= x:
  print("Yes")
elif abs(a - b) <= x and abs(b - c) <= x:
  print("Yes")
else:
  print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

ab_distance = max(a, b) - min(a, b)
bc_distance = max(b, c) - min(b, c)

if ab_distance <= d and bc_distance <= d:
  print('Yes')
else:
  print('No')


Failing test case input:
0 011 5 8

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

ab_distance = max(a, b) - min(a, b)
bc_distance = max(b, c) - min(b, c)
ac_distance = max(a, c) - min(a, c)

if ab_distance <= d and bc_distance <= d:
  print('Yes')
elif ac_distance <= d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
list1 = [int(a) for a in input().split()]
m_a = list1[0] 
m_b = list1[1] 
m_c = list1[2] 
m_d = list1[3] 

if abs(m_a - m_c) <= m_d:
    print("Yes")
else:
    print("No")

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
list1 = [int(a) for a in input().split()]
m_a = list1[0] 
m_b = list1[1] 
m_c = list1[2] 
m_d = list1[3] 

if abs(m_a - m_c) <= m_d:
    print("Yes")
elif abs(m_b - m_c) <= m_d:
    if abs(m_b - m_a) <= m_d:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
if c > a :
	print("Yes")
elif b + c > a:
	print("Yes")
else:
  	print("No")

Failing test case input:
4 111 1 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
if abs(c - a) <= d :
	print("Yes")
elif abs(b - a) <= d and abs(c - b) <= d:
	print("Yes")
else:
  	print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):







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


Between_a_to_c = abs( a - c )
Between_a_to_b = abs( a - b )
Between_b_to_c = abs( b - c )


if not Between_a_to_c >= d:
    print('Yes')
elif not Between_a_to_b >= d:
    if not Between_b_to_c >= d:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):







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


Between_a_to_c = abs( a - c )
Between_a_to_b = abs( a - b )
Between_b_to_c = abs( b - c )


if not Between_a_to_c > d:
    print('Yes')
elif not Between_a_to_b > d:
    if not Between_b_to_c > d:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Problem: p03351
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if b-a <= d and b-c <= d:
  print("Yes")
else:
  print("No")

Failing test case input:
0 111 2 81

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())

if abs(a-c) <= d:
  print("Yes")
elif abs(b-a) <= d and abs(c-b) <= d:
  print("Yes")
else:
  print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c)<=d:
  print('Yes')
else:
  print('No')

Failing test case input:
-2 100 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(c-a)<=d:
  print('Yes')
elif abs(b-a)<=d and abs(c-b)<=d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
print('Yes') if abs(b-a) <= d and abs(c-b) <= d else print('No')

Failing test case input:
-1 101 3 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
print('Yes') if abs(a-c) <= d or abs(a-b) <= d and abs(b-c) <= d else print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a , b , c, d= map ( int, input ().split())
if (a-c <= d) or (a-b <= d) and (b-c <= d):
    print("Yes")
else:
    print("No")

Failing test case input:
0 111 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a , b , c, d= map ( int, input ().split())
if abs(a-c) <= d or abs(a-b) <= d and abs(b-c) <= d:
    print("Yes")

else:
    print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

print("Yes" if (abs(b - a) <= d and abs(c - b) <= d) else "No")



Failing test case input:
0 111 1 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

print("Yes" if ((abs(b - a) <= d and abs(c - b) <= d) or abs(c - a) <= d) else "No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b)<=d and abs(b-c):
    print('Yes')
else:
    print('No')

Failing test case input:
1 111 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-c)<=d:
    print('Yes')
elif abs(a-b)<=d and abs(b-c)<=d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):







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


Between_a_to_c = abs( a - c )
Between_a_to_b = abs( a - b )
Between_b_to_c = abs( b - c )


if Between_a_to_c < d :
    print('Yes')
elif Between_a_to_b < d :
    if Between_b_to_c < d :
        print('Yes')
    else:
        print('No')
else:
    print('No')


Failing test case input:
2 000 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):







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


Between_a_to_c = abs( a - c )
Between_a_to_b = abs( a - b )
Between_b_to_c = abs( b - c )


if not Between_a_to_c > d:
    print('Yes')
elif not Between_a_to_b > d:
    if not Between_b_to_c > d:
        print('Yes')
    else:
        print('No')
else:
    print('No')
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = list(map(int, input().split()))
if abs(a-b)>=d and abs(b-c)>=d:
    print('Yes')
elif abs(a-c)>=d:
    print('Yes')
else:
    print('No')

Failing test case input:
0 001 -2 -2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a,b,c,d = list(map(int, input().split()))
if abs(a-b)<=d and abs(b-c)<=d:
    print('Yes')
elif abs(a-c)<=d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if abs(c - a) <= d:
    print('Yes')
elif (abs(b - a) <= d) and (abs(c-b) <= d):
    print('Yes')
else:
    print('No')

print(abs(b-a))

Failing test case input:
2 110 1 0

Expected output:
No


Actual output:
No
108


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

if abs(c - a) <= d:
    print('Yes')
elif (abs(b - a) <= d) and (abs(b - c) <= d):
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = [int(x) for x in input().split()]
if abs(a-b) > d:
    print('No')
elif abs(b-c) > d:
    print('No')
else:
    print('Yes')

Failing test case input:
0 100 -1 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = [int(x) for x in input().split()]
if abs(a-c) > d:
    if abs(a-b) > d:
        print('No')
    elif abs(b-c) > d:
        print('No')
    else:
        print('Yes')
else:
    print('Yes')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(lambda x: int(x), input().split())

if a - c <= d:
  print('Yes')
elif abs(a - b) + abs(b - c) <= d:
  print('Yes')
else:
  print('No')

Failing test case input:
0 011 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(lambda x: int(x), input().split())
 
if abs(a - c) <= d:
  print('Yes')
elif abs(a - b) <= d and abs(b - c) <= d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
icase=0    
if icase==0:
    a,b,c,d=map(int,input().split())
    if abs(a-b)<=d and (b-c)<=d:
        print("Yes")
    else:
        print("No")
        

Failing test case input:
-1 101 5 50

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
        
icase=0    
if icase==0:
    a,b,c,d=map(int,input().split())
    if (abs(a-b)<=d and abs(b-c)<=d) or abs(a-c)<=d:
        print("Yes")
    else:
        print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

a,b,c,d = iim()

if abs(a-c) < d or (abs(a-b) < d and abs(b-c) < d):
    print('Yes')
else:
    print('No')

Failing test case input:
2 001 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

a,b,c,d = iim()

if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

ab = b - a
bc = c - b

if a == b == c:
    print("Yes")
elif d > ab and d > bc:
    print("No")
else:
    print("Yes")

Failing test case input:
0 000 0 -1

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

ab = abs(a - b)
bc = abs(b - c)
ca = abs(c - a)

if ca <= d:
    print("Yes")
elif ab <= d and bc <= d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if abs(a-c) <= d:
  print("Yes")
print("No")

Failing test case input:
-1 011 5 8

Expected output:
Yes


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

if (abs(a-b) <= d and abs(b-c) <= d) or abs(a-c) <= d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())
if abs(a-c) < d or (abs(a-b) < d and abs(b-c) < d):
    print('Yes')
else:
    print('No')

Failing test case input:
0 111 0 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())
if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


def main():
    a, b, c, d = [int(x) for x in input().split()]
    print('Yes') if b-a<=d and c-b<=d or c-a<d else print('No')

if __name__ == '__main__':
    main()


Failing test case input:
4 111 0 -3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):


def main():
    a, b, c, d = [int(x) for x in input().split()]
    if abs(a-c)<=d or abs(a-b)<=d and abs(b-c)<=d:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if abs(b-a) <= d and abs(c-b) <= d:
    print('Yes')
else:
    print('No')

Failing test case input:
1 100 2 10

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

if abs(b-a) <= d and abs(c-b) <= d:
        print('Yes')
elif abs(a-c) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



def talkable(a, b, c, d):
    ab = abs(a - b) <= d
    bc = abs(b - c) <= d
    ca = abs(c - a) <= d

    if ab and bc:
        return True

    if bc and ca:
        return True

    return False


if __name__ == "__main__":
    a, b, c, d = map(int, input().rstrip().split(' '))
    if talkable(a, b, c, d):
        print('Yes')
    else:
        print('No')


Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):



def talkable(a, b, c, d):
    if abs(a - c) <= d:
        return True

    if abs(a - b) <= d:
        if abs(b - c) <= d:
            return True

    return False


if __name__ == "__main__":
    a, b, c, d = map(int, input().rstrip().split(' '))
    if talkable(a, b, c, d):
        print('Yes')
    else:
        print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if b-a>=d and c-b>=d:
  print("Yes")
else:
  print("No")

Failing test case input:
0 111 0 0

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(b-a)<=d and abs(c-b)<=d:
  print("Yes")
elif abs(c-a)<=d:
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())

print('Yes' if a - b < d and b - c < d else 'No')


Failing test case input:
0 100 -1 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())

print('Yes' if (abs(b - a) <= d and abs(c - b) <= d) or abs(c -a) <= d else 'No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int,input().split())

if abs(a-c) >= d or (abs(a-b) >= d and abs(b-c) >= d):
  print("Yes")
else:
  print("No")


Failing test case input:
0 011 5 3

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
a, b, c, d = map(int,input().split())

if abs(a-c) <= d or (abs(a-b) <= d and abs(b-c) <= d):
  print("Yes")
else:
  print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())

if abs(a - b) + abs(b - c) <= d or abs(a - c) <= d:
    print("Yes")
else:
    print("No")

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())

if (abs(a - b)  <= d and abs(b - c) <= d) or abs(a - c) <= d:
    print("Yes")
else:
    print("No")
Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())
print('Yes' if abs(a-b)<=d and abs(c-b)<=d else 'No')

Failing test case input:
4 7 2 3

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
print('Yes' if (abs(a-b)<=d and abs(c-b)<=d) or abs(a-c)<=d else 'No')

Problem: p03351
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a,b,c,d = map(int,input().split())

if abs(a-c)<=d or (abs(a-b)+abs(b-c)<=d):
    print("Yes")
else:
    print("No")

Failing test case input:
4 7 9 3

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int,input().split())

if abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d):
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d=map(int,input().split())
if abs(a-b) and abs(b-c) <=d:
  print("Yes")
else:
  print("No")

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d=map(int,input().split())
if abs(a-c) <= d or abs(a-b)<=d and abs(b-c) <=d:
  print('Yes')
else:
  print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, d = map(int, input().split())
ans="No"
ab=a-b
if ab<0:
    ab=-ab
bc=b-c
if bc<0:
    bc=-bc
ac=a-c
if ac<0:
    ac=-ac
if (ab<=d and bc<=d)or (ac<d):
    ans="Yes"
print(ans)


Failing test case input:
2 000 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())
ans="No"
ab=a-b
if ab<0:
    ab=-ab
bc=b-c
if bc<0:
    bc=-bc
ac=a-c
if ac<0:
    ac=-ac
if (ab<=d and bc<=d)or (ac<=d):
    ans="Yes"
print(ans)

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,d = map(int, input().split())
if abs(b-a) <= d and abs(c-b) <= d and abs(c-a) <= d:
    print("Yes")
else:
    print("No") 

Failing test case input:
2 100 1 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a,b,c,d = map(int, input().split())
if (abs(b-a) <= d and abs(c-b) <= d) or abs(c-a) <= d:
    print("Yes")
else:
    print("No")

Problem: p03351
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

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


if abs(a - c) <= c:
    print('Yes')
elif abs(a - b) <= c and abs(b - c) <= c:
    print('Yes')
else:
    print('No')

Failing test case input:
-1 101 0 24

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = map(int, input().split())


if abs(a - c) <= d:
    print('Yes')
elif abs(a - b) <= d and abs(b - c) <= d:
    print('Yes')
else:
    print('No')

Problem: p03351
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
l = list(map(int, input().split()))
d = l.pop()
a, b, c = sorted(l)
print("YNeos"[any((b - a > d, c - b > d))::2])

Failing test case input:
1 111 0 1

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
a, b, c, d = list(map(int, input().split()))
print("YNeos"[abs(a - c) > d and any((abs(b - c) > d, abs(a - b) > d))::2])