TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a,b):
    return a*b // gcd(a,b)

n = int(input())
t_list = []
for x in range(n):
    t_list.append(int(input()))
result = 1
for t in t_list:
    result = lcm(result,t)
print(result)

str = input()
print(str == str[-1::-1])

str = input()
print("Yes" if str == str[-1::-1] else "No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a, b, c = input()
if a == c:
    print("yes")
else:
    print("No")



a, b, c = map(int, input().split())
if a == c: print("yes")
else: print("No")



a, b, c = input()
if a == c:
    print("Yes")
else:
    print("No")



Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N=(input())
if N[0]==N[2]:
    print ('YES')
else:
    print ('NO')

N=(input())
if N[0]==N[2]:
    print ('Yes')
else:
    print ('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
# -*- coding: utf-8 -*-


def main():
    from collections import defaultdict
    from collections import deque

    n = int(input())
    graph = [defaultdict(int) for _ in range(n)]
    visited = [False for _ in range(n)]
    dist = [float('inf') for _ in range(n)]

    for i in range(n - 1):
        ai, bi, ci = map(int, input().split())
        ai -= 1
        bi -= 1
        graph[ai][bi] = ci
        graph[bi][ai] = ci

    q, k = map(int, input().split())
    k -= 1
    dist[k] = 0
    d = deque()
    d.append(k)

    while d:
        di = d.popleft()
        visited[di] = True

        for bi, ci in graph[di].items():
            if visited[bi]:
                continue

            dist[bi] = dist[di] + ci
            d.append(bi)

    ans = [0 for _ in range(q)]

    for j in range(q):
        xi, yi = map(int, input().split())
        xi -= 1
        yi -= 1
        ans[j] = dist[xi] + dist[yi]

    print('\n'.join(map(str, ans)))


if __name__ == '__main__':
    main()


# -*- coding: utf-8 -*-




if __name__ == '__main__':
    number = input()

    if number[0] == number[2]:
        print('Yes')
    else:
        print('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a=str(input())
aa =sorted(a,reverse =True)
print("Yes" if a==aa else "No")

a=str(input())
aa =a[-1::-1]
print("Yes" if a==aa else "No")

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
#!/usr/bin/env python3
import sys


YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int):
    s = str(N)
    print(s[0] == s[2])


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == '__main__':
    main()


#!/usr/bin/env python3
import sys


YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(N: int):
    s = str(N)
    print(YES if s[0] == s[2] else NO)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
# coding: utf-8
def II(): return int(input())
def ILI(): return list(map(int, input().split()))


def read():
    N = II()
    return (N, )


def solve(N):
    n = str(N)
    if n == reversed(n):
        ans = "Yes"
    else:
        ans = "No"
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()


# coding: utf-8
def II(): return int(input())
def ILI(): return list(map(int, input().split()))


def read():
    N = input()
    return (N, )


def solve(N):
    rev = str(int("".join(reversed(N))))
    if N == rev:
        ans = "Yes"
    else:
        ans = "No"
    return ans


def main():
    params = read()
    print(solve(*params))


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = input()
print('YES' if n[0]==n[-1] else 'NO')

n = input()
print('YES' if n==::n else 'NO')

n = input().range(3)
print('Yes' if n[0]==n[2] else 'No')

n = input()
print('Yes' if n[0]==n[2] else 'No')

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = int(input())
print("YES" if N[0]==N[-1] else "NO")

N = input()
print("YES" if N[0]==N[-1] else "NO")

N = input()
print("Yes" if N[0]==N[-1] else "No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
from sys import stdin

n = stdin.readline().rstrip()
print('Yes' if n == reversed(n) else 'No')

import sys

n = sys.stdin.readline().rstrip()

def main():
    ans = 'Yes' if n == n[::-1] else 'No'
    print(ans)

if __name__ ==  '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = input()
print("Yes" if n==n[::-] else "No")

n = input()
print("Yes" if n==n[::-1] else "No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = int(input())
print("Yes" if N[0]==N[2] else "No")

N = input()
print("Yes" if N[0]==N[2] else "No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
print("Yes" if input()[0]==input()[2] else "No")

a=input()
print("Yes" if a[0]==a[2] else "No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
A,B,C,D = map(int,input().split())
if B <= C:
    print(0)
elif C < B <= D:
    print(B - C)
elif C < D <= B:
    print(D - C)
elif D <= A:
    print(0)

N = input()
list = []
for i in N:
    list.append(i)
list.reverse()
new = ''.join(list)
if new == N:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,_b=input()
if a==b:
  print("YES")
else:
  print("No")

a,_,b=input()
if a==b:
  print("YES")
else:
  print("No")

a,_b=input()
if a==b:
  print("YES")
else:
  print("No")

a,_,b=input()
if a==b:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,b,c,d = map(int,input().split())
if b<c or d<a:
    print(0)
elif a<=c<d<=b:
    print(d-c)
elif c<a<b<d:
    print(b-a)
else:
    print(b-c)

a,b,c,d = map(int,input().split())
if b<c or d<a:
    print("0")
elif a<c<d<b:
    print(d-c)
elif c<a<b<d:
    print(b-a)
else:
    print(b-c)

a,b,c=input()
print("Yes" if a==c else "No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input()
if N = N[::-1]:
  print('Yes')
else:
  print('No')

N = input()
if N == N[::-1]:
  print('Yes')
else:
  print('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = int(input())
print('Yes' if n[0] == n[2] else 'No')

n = int(input())
print("Yes" if n[0]== n[2] else 'No' )

n=input()
print("Yes" if n[0]==n[2] else "No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,b,c = int(input())
print('Yes' if a == c else 'No')

a,b,c = input()
print('Yes' if a == c else 'No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
A = input()

if A == A[:-1]:
    print('Yes')
else:
    print('No')

A = input()

if A == A[::-1]:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input()
if N[0] == N[2]:
    print("yes")
else:
    print("no")

N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
    
def lcm(a, b):
	return a * b // gcd (a, b)

result = lcm(T[0],T[1])

for x in range(2,N):
    result = lcm(result, T[x])

print(result)
    


N = input()
if N[0] == N[2]:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a=input()
b=""
for i in range(a,0,-1):
  b+=a[i]
if a==b:
  print("Yes")
else:
  print("No")

a=input()
b=""
for i in range(len(a),0,-1):
  b+=a[i]
if a==b:
  print("Yes")
else:
  print("No")

a=input()
b=""
for i in range(1,len(a)+1):
  b+=a[-i]
if a==b:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=input()
if n[0]==n[2[]:
    print("Yes")
else:
    print("No")

n=input()
if n[0]==n[2]:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
s = input()
a = len(s)
for i in s:
    if s[i] == s[a - 1 -i] :
        b = 1
    else:
        b = 0
        break


if b == 1:
    print('Yes')
else:
    print('No')



s = input()
a = len(s)
i = 0
for i in range(a):
    if s[i] == s[a - 1 - i]:
        b = 1
    else:
        b = 0
        break


if b == 1:
    print('Yes')
else:
    print('No')



Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = int(input())

if N[0] == N[2]:
    print("Yes")
else:
    print("No")

N = input()

if N[0] == N[2]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
if (n = input().split())[0] == n[2] : print('Yes')
else : print('No')


n = input()
if n[0] == n[2] : print('Yes')
else : print('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,b,c=input()
if a == c: print('Yes') else: print('No')

a,b,c=input()
if a == c:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = int(input().split())
if n[0]==n[2]: print('Yes')
else: print('No')

n = list(map(int,input()))
if n[0]==n[2]: print('Yes')
else: print('No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a = list(int.input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

a=int(input())
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

a=int(input().split())
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

a = list(int,input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

a,b,c = list(int,input().split())
if a==c:
  print("YES")
else:
  print("NO")

a,b,c = list(int,input().split())
if a==c:
  print("Yes")
else:
  print("No")

a=input()
if a[0]==c[2]:
  print("Yes")
else:
  print("No")

a = map(int.input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

a = int(input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

a=input()
if a[0]==a[2]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=list(input())
if n==n[::-1]:
    print("YES")
else:
    print("NO")


n=list(input())
if n==n[::-1]:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input( )

N_100 = N // 100
N = N - 100 * N_100
N_10 = N // 10
N = N - 10 * N_10
N_1 = N

if  N_100 == N_1:
    print ('Yes')
else :
    print ('No')

N = int (input( ))

N_100 = N // 100
N = N - 100 * N_100
N_10 = N // 10
N = N - 10 * N_10
N_1 = N

if  N_100 == N_1:
    print ('Yes')
else :
    print ('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = input()

print("".join(list(reversed(n))))

n = input()

print("Yes" if n == "".join(list(reversed(n))) else "No")

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = str(input())
if n == n[::-1]:
    print("Yes")
else("No")

n = input()
if n == n[::-1]:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=input()
if n(0)==n(2):
  print('Yes')
else:
  print('No')

n=input()
if n[0]==n[2]:
  print('Yes')
else:
  print('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = list(input().split())
if n[0]==n[2]:
    print("Yes")
else:
    print("No")

n = list(input())
if n[0]==n[2]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = int(input())
m = n // 100
if m == n[-1]:
    print('Yes')
else:
    print('No')

n = int(input())
i = str(n)
m = n // 100
if str(m) == i[-1]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = int(input())
T = [int(input()) for i in range(N)]

import fractions
def lcm(a, b):
    if gcd != 0:
        return (a * b) // gcd
    else:
        return 0

gcd = 1
x = 0

for i in range(N):
    for j in range(N):
        gcd = int(fractions.gcd(T[i] , T[j]))
        x = max(lcm(T[i], T[j]), x)

print(x)


N = str(input())

A = N[::-1]
if N == A:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,b,c,d=(int(x) for x in input().split())

if b<=c or d<=a:
    print(0)
else:
    print(min(b,d)-max(a,c))


n=str(input())

if n[0]=n[2]:
    print("Yes")
else:
    print("No")


n=str(input())

if n[0]==n[2]:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
from collections import *
from heapq import*
import sys
input=lambda:sys.stdin.readline()

d=defaultdict(list)
n=int(input())

for s in range(n-1):
    a,b,c=map(int,input().split())
    d[a].append([b,c])
    d[b].append([a,c])
#defaultdict(<class 'list'>, {1: [[2, 1], [3, 1]], 2: [[1, 1], [3, 3]], 3: [[1, 1], [2, 3]]})

def DIJKSTRA(point,d):
    cost      = {node:float("inf") for node in d.keys()}
    Q         = []  
    cost[point]=0  
    heappush(Q,(point,cost[point]))
    while Q:
        prefnd,tmpC=heappop(Q)
        if cost[prefnd]<tmpC:
            continue
        for node,c in d[prefnd]:
            altC=c+tmpC
            if cost[node]>altC:
                cost[node]=altC
                heappush(Q,(node,altC))
    return cost

q,k=map(int,input().split())
y=DIJKSTRA(k,d)

for i in range(q):
    a,b=map(int,input().split())
    print(y[a]+y[b])

n=list(input())
s=[1 for i in range(len(n)//2) if n[i]==n[len(n)-i-1]]
print("Yes" if len(s)==len(n)//2 else "No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
# coding: utf-8
# Here your code !
import sys
a=input()
if a==a[::-1]:
    print("YES")
else:
    print("NO")


# coding: utf-8
# Here your code !
import sys
a=input()
if a==a[::-1]:
    print("YES")
else:
    print("NO")


# coding: utf-8
# Here your code !
import sys
a=input()
if a==a[::-1]:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
print(["No","Yes"][input()==input()[::-1]])

N=int(input())
if N==N[::-1]:
    print("Yes")
else:
    print("No")

a=input()
print('Yes' if a[0:]==a[-1:] else 'No')

a=input()
print('Yes' if a[0:]==a[-1::-1] else 'No')


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = int(input())
if n[::-1]==n:
    print("Yes")
else:
    print("No")

n = input()
if n[::-1]==n:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
if input()[0]==input()[2]:
    print('Yes')
else:
    print('No')

a=input()
if a[0]==a[2]:
    print('Yes')
else:
    print('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=input()
if n[0]==n[2]:
  print('Yes')
print('No')

n=input()
if n[0]==n[2]:
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
num = int(input())
lst = []
while num > 0:
    lst.append(num%10)
    num //= 10
lst2 = lst.reverse()
if lst == lst2:
  print("Yes")
else:
  print("No")

num = int(input())
lst = []
lst2 = []
while num > 0:
    lst.append(num%10)
    lst2.append(num%10)
    num //= 10
lst2.reverse()
if lst == lst2:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input()
NN = list(N)
checker = ""
for i in range(len(NN)):
    checker += NN[-1]
if N == checker:
    print("Yes")
else:
    print("No")

A,B,C,D = map(int,input().split())
if C >= B or D <= A:
    print(0)
elif A <= C <= D <= B:
    print(D-C)
elif C <= A <= B <= D:
    print(B-A)
elif C <= B:
    print(B-C)
else:
    print(D-A)


N = input()
NN = list(N)
checker = ""
for i in range(len(NN)):
    checker += NN[-i-1]
if N == checker:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N=input()
if N[0]==N[2]:
  print("YES")
else:
  print("NO")

N=input()

if N[0]==N[-1]:
  print("YES")
else:
  print("NO")

N=input()
if N[0]==N[2]:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):






def main():
	n = int(input())
	c1 = n % 10
	c2 = n // 10 % 10
	c3 = n // 100
	if c1 == c3:
		print("Yes")
	else:
		print("No")
	print(c1, c2, c3)





if __name__ == "__main__":
	main()







def main():
	n = int(input())
	c1 = n % 10
	c2 = n / 10 % 10
	c3 = n / 100
	if c1 == c3:
		print("Yes")
	else:
		print("No")






if __name__ == "__main__":
	main()







def main():
	n = int(input())
	c1 = n % 10
	c2 = n // 10 % 10
	c3 = n // 100
	if c1 == c3:
		print("Yes")
	else:
		print("No")





if __name__ == "__main__":
	main()

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = input()
a1 = n%10
a2 = (n-a1)%100
a3 = (n-a1-a2)/100
if a1==a2:
    print("Hello World")

n = input()
a1 = n%10
a2 = (n-a1)%100
a3 = (n-a1-a2)/100
if a1==a3:
    print("Hello World")

n=int(input())
a1 = n % 10
a2 = (n - a1) % 100
a3 = (n - a1 - a2) / 100
if a1 == a3:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a = input()
print("Yes" if a == a.reverse() else "No")

a = input()
print("Yes" if a == a[::-1] else "No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
s = input()
print("Yes" if s[::-1]=s else "No")

s = input()
print("Yes" if s[::-1]==s else "No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = map(str, input())
if N[0]==N[2]:
  print('Yes')
else:
  print('No')

N = str(input())
if N[0]==N[2]:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = int(input())
t = [int(input()) for i in range(n)]

def gcd(a, b):
  if a<b:
    a, b = b, a
  if b==0:
    return a
  return gcd(b, a%b)

def lcm(a, b):
  g = gcd(a, b)
  return a*b//g

ans = 1
for i in range(n):
  ans = lcm(ans, t[i])
print(ans)

n = input()
if n[0]==n[2]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N=input()
if N(0)==N(2):
  print("Yes")
else:
  print("No")

N=input()
if N[0]==N[2]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = list(input())
if N == N[::-1]:print('YES') 
else: print('NO')

N = list(input())
if N == N[::-1]:print('Yes') 
else: print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
sec = input().split(' ')


#print(sec[0],sec[1],sec[2],sec[3])

start = max(sec[0],sec[2])


end = min(sec[1],sec[3])

kekka =(int(end) - int(start))
if kekka < 1:
	kekka = 0
	print(kekka)
else:
	print(kekka)

kaibun = input()
print(kaibun)
print(kaibun[::-1])
if kaibun == kaibun[::-1]:
	print('Yes')
else:
	print('No')

# coding: utf-8
kaibun = str(input())
print(kaibun)
print(kaibun[::-1])
if kaibun == kaibun[::-1]:
	print('Yes')
else:
	print('No')

kaibun = str(input())
print(kaibun)
print(kaibun[::-1])
if kaibun == kaibun[::-1]:
	print('Yes')
else:
	print('No')

kaibun = str(input())


if kaibun == kaibun[::-1]:
	print('Yes')
else:
	print('No')

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
s=input()
t=s.reverse()
if s==t:
  print("Yes")
else:
  print("No")


s=list(input())
t=reversed(s)
if s==t:
  print("Yes")
else:
  print("No")

from copy import deepcopy as dp
s=list(input())
t=dp(s)
s.reverse()
if s==t:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input().split()

if N[0] == N[2]:
  print('Yes')
else:
  print('No')

# coding: utf-8
# Your code here!

N = input()
 
if N[0] == N[2]:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input()
if int(N) == int(N[-1]):
  print('Yes')
else:
  print('No')

N = input()
if int(N) == int(N[::-1]):
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
s = input()
print("YES" if s==s[::-1] else "NO")

s = input()
print("Yes" if s==s[::-1] else "No")

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
def main():
    i = list(map(int, input().split()))
    n = i[0]

    if n < 100 or 999 < n or isinstance(n, int) == False:
        return

    if(str(n[0]) == str(n[2])):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

def main():
    i = list(map(int, input().split()))
    n = i[0]

    if n < 100 or 999 < n or isinstance(n, int) == False:
        return

    if(str(n)[0] == str(n)[2]):
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
from fractions import gcd

N = int(input())
T = []
for i in range(N):
  T.append(int(input()))

res = 1
for t in T:
  res = int(res/(gcd(res, t))) * t
print(res)

import sys

N = input()

for i in range(len(N)):
  if N[i] != N[len(N)-1-i]:
    print("No")
    sys.exit()

print("Yes")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
A,B,C=map(int,input().split())
if A == C:
  print('Yes')
else:
  print('No')

A,B,C=input()
if int(A)==int(C):
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
s=input()
print("YES" if s[0]==s[2] else "No")

s=(input)
print("YES" if s[0]==s[2] else "No")

s=(input)
print("YES" if s[0]==s[2] else "No")

s=str(input())
print("YES" if s[0]==s[2] else "No")

print("YES" if input()[0]==input()[2] else "No")

s=input()
print("Yes" if s[0]==s[2] else "No")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
x=int(input())
if x[0]==x[2]:print("Yes")
else:
  print("No")

x=input()
if x[0]==x[2]:print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = list(input())
if N == N.reverse():
  print("Yes")
else:
  print("No")

N = list(input())
new = list(reversed(N))
if N == new:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a=int(input());print('Yes' if a[0]==a[2] else 'No')

a=input();print('Yes' if a[0]==a[2] else 'No')

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = int(input())
g = {i: []for i in range(1, N+1)}    

cache = {}
def dfs(g,start,end):
    stack = [(start, [start], 0)]
    while stack:
        (v, path, length) = stack.pop()
        for next,l in g[v]:
            if next in path: continue
            if next == end:
                return length + l
            else:
                stack.append((next, path + [next], length + l))

for i in range(N-1):
    a, b, c = map(int,input().split())
    g[a].append((b,c))
    g[b].append((a,c))
Q, K = map(int,input().split())

for v in range(1,N+1):
    cache[v] = dfs(g,v,K)

for q in range(Q):
    x, y = map(int,input().split())
    print(cache[x] + cache[y])

N = input()
if N == N[::-1]:
    print('Yes')
else:
    print('No')


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = str(input())
m = n[::-1]
print(n)
print(m)
if n == m:
    print("Yes")
else:
    print("No")


n = str(input())
m = n[::-1]
if n == m:
    print("Yes")
else:
    print("No")


Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,b,c = input()
  
print('Yes' if a==c else ;'No') 

a,b,c = input()
  
print('Yes' if a==c else 'No') 

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a = input()
print("Yes" if a == reversed(a) else "No")

print("Yes" if input() == reversed((input()) else "No")

a = input()
b = reversed(a)
print("Yes" if a == b else "No")

a = input()
print("Yes" if a == a[::-1] else "No")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = input()
ans = 'Yes' if n == [::-1] else 'No'
print(ans)

n = input()
ans = 'Yes' if n == n[::-1] else 'No'
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
import math as m
from functools import reduce
 
n=int(input())
l=[]
def f(a,b):
    return int(a*b/m.gcd(a,b))
for i in range(n):
    l.add(int(input()))
print(reduce(f,l))


a=input()
if a[0]==a[2]:
    print("Yes")
else:print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N=list(input())
print(N)
flag=1
for i in range(len(N)):
    if N[i]!=N[-i-1]:
        flag=0
print("Yes" if flag else "No")


N=list(input())
flag=1
for i in range(len(N)):
    if N[i]!=N[-i-1]:
        flag=0
print("Yes" if flag else "No")


Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
import numpy as np
from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
N=int(input())
tree=np.array([[0]*N for i in range(N)])
for i in range(N-1):
    a,b,c=map(int,input().split(' '))
    tree[a-1][b-1] = c
    tree[b-1][a-1] = c
Q,K=map(int,input().split(' '))
ans = dijkstra(tree,indices=K-1)
for i in range(Q):
    s,e=map(int,input().split(' '))
    print(int(ans[s-1]+ans[e-1]))


def main():
    n=input()
    for i,j in zip(n,reversed(n)):
        if i!=j:
            print('No')
            exit()
    print('Yes')

if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a, b ,c = map(int, input().split())

if a == c:
  print("Yes")
else:
  print("No")

number = input()
if number[0] == number[2]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
print("Yes" if input() == reversed(input()) else "No")

N = input()
print("Yes" if N[0] == N[2]  else "No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = int(input())
if n[0] == n[2]:
    print('Yes')
else:
    print('No')

n = int(input())
if str(n[0]) = str(n[2]):
    print('Yes')
else:
    print('No')

n = int(input())
if n[0] == n[-1]:
    print('Yes')
else:
    print('No')

n = int(input())
if str(n[0]) == str(n[2]):
    print('Yes')
else:
    print('No')

n = input()
if n[0] == n[-1]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
def solve():
    A, B, C, D = list(map(int, input().split()))
    ans = min(B,D) - max(A,C)
    if ans < 0:
        ans = 0
    print(ans)
    
solve()

# coding: utf-8
# Here your code !
N = int(input())
A = int(input())

print(N*N-A)

N = input()

if N[0] == N[2]:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=input()
print(reverse[::-1])


n=input()
print(n[::-1])


n=input()
print(reverse(n))

n=input()
m=n[::-1]
if n=m:
  print("Yes")
else:
  print("No")

n=input()
m=n[::-1]
if n==m:
  print("Yes")
else:
  print("No")


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
l = input()
print("Yes" if l[0]=l[2] else "No") 


l = input()
print("Yes" if l[0]==l[2] else "No") 


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
N = input()

top = N[0]
bottom = N[2]

if top == bottom:
    print('YES')
else:
    print('NO')

N = input()

top = N[0]
bottom = N[2]

if top == bottom:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=int(input())

h=n//100

t=(n-h*100)//10

o=(n-h*100-t*10)

if h=o:
  print("Yes")
else:
  print("No")

N=int(input())

a=N//100

b=N-a

if (N-a)%10==0:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n = input()
if n == ins[::-1]:
    print("Yes")
else:
    print("No")


n = input()
if n == n[::-1]:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=input()
for i in range(len(n)//2)
    if n[i]!=n[-1-i]:
        print("No")
        exit()
print("Yes")

n=input()
for i in range(len(n)//2):
    if n[i]!=n[-1-i]:
        print("No")
        exit()
print("Yes")



Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
import fractions

def lcm(a,b):
    g = fractions.gcd(a,b)
    return (a/g) * b

n = int(input())

ans = 1
for i in range(n):
    t = int(input())
    ans = lcm(ans,t)

print(int(ans))

n = input()

if n == n[::-1]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a < i < b and c < i < d:
    ans += 1
print(ans+1)
  


a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a < i < b and c < i < d
  ans += 1
print(ans+1)
  

a,b,c,d = map(int,input().split())
ans = 0
for i in range(101):
  if a <= i < b and c <= i < d:
    ans += 1
print(ans)
  


N =list(input())
if N[0] == N[2]:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
n=input()
print('YES' if n==n[::-1] else 'NO')

N = input()
print("Yes" if N[0] == N[2] else "No")

Verdicts: Wrong Answer

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
a=input().split()
if(a[0]==a[2]):
 print("Yes")
else:
 print("No")

a=input().split
if(a[0]==a[2]):
 print("Yes")
else:
 print("No")

a = input()
a.split()

if(a[0] == a[2]):
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a three-digit positive integer N.   Determine whether N is a _palindromic number_.   Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.

Submission attempts (in order):
print(["No","Yes"][input()[0]==input()[2]])

a=input();print(["No","Yes"][a[0]==a[2]])

Verdicts: Runtime Error

Accepted