Problem:
 Score: 100 points    Problem Statement  In this problem, a date is written as Y-M-D. For example, 2019 - 11 - 30 means November 30 , 2019 .  Integers M_1, D_1, M_2 , and D_2 will be given as input. It is known that the date 2019 - M_2 - D_2 follows 2019 - M_1 - D_1 . Determine whether the date 2019 - M_1 - D_1 is the last day of a month.      Constraints   Both 2019 - M_1 - D_1 and 2019 - M_2 - D_2 are valid dates in the Gregorian calendar.  The date 2019 - M_2 - D_2 follows 2019 - M_1 - D_1 .         Input  Input is given from Standard Input in the following format:  M_1  D_1  M_2  D_2       Output  If the date 2019 - M_1 - D_1 is the last day of a month, print 1 ; otherwise, print 0 .        Sample Input 1 11 16
11 17      Sample Output 1 0  November 16 is not the last day of a month.       Sample Input 2 11 30
12 1      Sample Output 2 1  November 30 is the last day of November.

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def solve():
    a, b = LI()
    c, d = LI()
    if a != c:
        print(1)
    else:
        print(0)
    return



if __name__ == '__main__':
    solve()

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

if(d==1):
  print(1)
else:
  print(0)

Solution (Python):

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()



def main():
    m1, d1 = mi()
    m2, d2 = mi()
    if(m1 != m2):
        print(1)
    else:
        print(0)
    return


if __name__ == '__main__':
    main()

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

ret = 0
if m1 != m2:
    ret = 1

print(ret)

Solution (Python):
l = list(map(int, input().split()))
n = list(map(int, input().split()))


if l[0] == 12 and n[0]==1 :
    print("1")


elif n[0] == l[0] +1:
    print("1")

else:
    print("0")

Solution (Python):
a,b=input().split(" ")
c,d=input().split(" ")
if a == c:
  print(0)
else:
  print(1)

Solution (Python):
M1,D1 = map(int, input().split(" "))
M2,D2 = map(int, input().split(" "))


if M1 != M2:
    print (1)
else:
    print (0)

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
if a + 1 == c:
    print(1)
else:
    print(0)

Solution (Python):
a ,b =map(int,input().split())

if a==1 and b==31 or a==2 and b==28 or a==3 and b==31 or a==4 and b==30 or a==5 and b==31 or a==6 and b==30 or a==7 and b==31 or a==8 and b==31 or a==9 and b==30 or a==10 and b==31 or a==11 and b==30 or a==12 and b==31:
    print(1)
else:
    print(0)

Solution (Python):
Month = [0,1,2,3,4,5,6,7,8,9,10,11,12]
Day = [31,28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

IN = list(map(int, input().split()))
_month1 = IN[0]
_day1 = IN[1]

IN = list(map(int, input().split()))
_month2 = IN[0]
_day2 = IN[1]

if _month1 == 1:
    if _day1 == 31:
        print(1)
    else:
        print(0)
        
if _month1 == 2:
    if _day1 == 28:
        print(1)
    else:
        print(0)

if _month1 == 3:
    if _day1 == 31:
        print(1)
    else:
        print(0)

if _month1 == 4:
    if _day1 == 30:
        print(1)
    else:
        print(0)
        
if _month1 == 5:
    if _day1 == 31:
        print(1)
    else:
        print(0)

if _month1 == 6:
    if _day1 == 30:
        print(1)
    else:
        print(0)

if _month1 == 7:
    if _day1 == 31:
        print(1)
    else:
        print(0)
        
if _month1 == 8:
    if _day1 == 31:
        print(1)
    else:
        print(0)

if _month1 == 9:
    if _day1 == 30:
        print(1)
    else:
        print(0)

if _month1 == 10:
    if _day1 == 31:
        print(1)
    else:
        print(0)
        
if _month1 == 11:
    if _day1 == 30:
        print(1)
    else:
        print(0)

if _month1 == 12:
    if _day1 == 31:
        print(1)
    else:
        print(0)

Solution (Python):



one = input().split()

two = input().split()

if one[0] != two[0]:
    print(1)
else:
    print(0)

Solution (Python):
m,d= map(int,input().split())
x,y= map(int,input().split())
ans = 0
if m == x-1:
  ans = 1
elif m == 12 and d == 31:
  ans = 1
print(ans)

Solution (Python):
n = 2
e = [[int(i) for i in input().split()] for i in range(n)]

if e[1][1]==1:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())
if D2 == 1:
  print(1)
else:
  print(0)

Solution (Python):
m1, d1 = map(int, input().split(' '))
m2, d2 = map(int, input().split(' '))

ans = 0
if d2 == 1:
  ans = 1

print(ans)

Solution (Python):
m1,d1=[int(x) for x in input().split()]
m2,d2=[int(x) for x in input().split()]
if m1!=m2:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 != m2:
    print("1")
else:
    print("0")

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())

if(D1 - D2 > 0):
    print('1')
else:
    print('0')

Solution (Python):
import sys


def main():
    
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())

    if m1 == m2:
        print('0')
    else:
        print('1')


if __name__ == '__main__':
    main()

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

if a != c and d == 1:
  print(1)
else:
  print(0)

Solution (Python):

m1,d1 = map(int, input().split())
m2,d2 = map(int, input().split())
if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
m,_ = map(int,input().split())
k,_ = map(int,input().split())
if m != k:
    print("1")
else:
    print("0")

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 == m2:
  print(0)
else:
  print(1)

Solution (Python):
m1,d1 = map(int, input().split())
m2,d2 = map(int, input().split())
if m1 == m2:
    print(0)
    exit(0)
print(1)

Solution (Python):
m,d=map(int,input().split())
n,e=map(int,input().split())
if m==n:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1!=M2 and D2==1:
    print('1')
else:
    print('0')

Solution (Python):
A,B=map(int, input().split())
C,D=map(int, input().split())
if D == 1:
    print(1)
else:
    print(0)

Solution (Python):
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue


Mod = 1000000007
import sys

sys.setrecursionlimit(100000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): 
    md = [list(map(int,input().split())) for i in range(2)]
    if md[0][0] == md[1][0]:
        print(0)
    else:
        print(1)

if __name__ == "__main__":
    main()

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if M1 != M2:
    print('1')
else:
    print('0')

Solution (Python):
N=2
x = [0] * N
y = [0] * N
for i in range(N):
  x[i], y[i] = map(int, input().split())
if(x[0]==x[1]):
  print(0)
else:
  print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = list(map(int,input().split()))
m2,d2 = list(map(int,input().split()))

if m1 == m2:
  print('0')
else:
  print('1')

Solution (Python):
def fetch_int_input():
    return [int(s) for s in input().strip().split()]

pre_input = fetch_int_input()
nxt_input = fetch_int_input()

echo_str = ""
if pre_input[0] != nxt_input[0]:
  echo_str = 1
 
else:
  echo_str = 0
 
print(echo_str)

Solution (Python):
def main():
    M1, D1  = list(map(int, input().split()))
    M2, D2  = list(map(int, input().split()))

    if D2 == 1 and M1 != M2:
        print(1)
    else:
        print(0)
    
    
if __name__ == "__main__":
    main()

Solution (Python):
R = lambda : map(int, input().split())

m1, d1 = R()
m2, d2 = R()
print(int(d2 == 1))

Solution (Python):
import numpy as np
s = input().split(" ")
s = [int(s[i]) for i in range(len(s))]
M1 = s[0]
D1 = s[1]

s = input().split(" ")
s = [int(s[i]) for i in range(len(s))]
M2 = s[0]
D2 = s[1]

if M1 == M2 - 1:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if(d2==1):
    print(1)
else:
    print(0)

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

x = 1 if d == 1 else 0

print(x)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if D2==1:
  print(1)
else:
  print(0)

Solution (Python):
import collections
import itertools as it
import math
import numpy as np









M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

lastd = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if M1==1 and D1==31:
    print(1)
elif M1==2 and D1==28:
    print(1)
elif M1==3 and D1==31:
    print(1)
elif M1==4 and D1==30:
    print(1)
elif M1==5 and D1==31:
    print(1)
elif M1==6 and D1==30:
    print(1)
elif M1==7 and D1==31:
    print(1)
elif M1==8 and D1==31:
    print(1)
elif M1==9 and D1==30:
    print(1)
elif M1==10 and D1==31:
    print(1)
elif M1==11 and D1==30:
    print(1)
elif M1==12 and D1==31:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())


def main():
    if m1 == 12:
        if m2 == 1 and d2 == 1:
            return True
        else:
            return False
    else:
        if (m1 + 1) == m2 and d2 == 1:
            return True
        else:
            return False


if __name__ == "__main__":
    if main():
        print('1')
    else:
        print('0')

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
M1, D1 = input().split(" ")
M1, D1 = int(M1), int(D1)

M2, D2 = input().split(" ")
M2, D2 = int(M2), int(D2)

if M1 == M2 and D1+1 == D2:
	print("0")
elif M1 + 1 == M2 and D2 == 1:
	if 28 <= D1 <= 31:
		print("1")
	else:
		print("0")
else:
	print("0")

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
  print(1)
else:
  print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())


if d1 + 1 == d2:
    print(0)
else:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d2 == 1:
	print(1)
else:
	print(0)

Solution (Python):
import datetime
import calendar

m, d = map(int, input().split())
m2, d2 = map(int, input().split())


if 1 == d2:
  print(1)
else:
  print(0)

Solution (Python):
day1 = int(input().split()[0])
day2 = int(input().split()[0])

if day1 == day2:
  print("0")
else:
  print("1")

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

if a == c:
    print("0")
else:
    print("1")

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
  print(0)
else:
  print(1)

Solution (Python):
import datetime

M1, D1 = input().split(' ')
M2, D2 = input().split(' ')

M1 = int(M1)
M2 = int(M2)
D1 = int(D1)
D2 = int(D2)

date1 = datetime.datetime(2019, M1, D1)
date2 = datetime.datetime(2019, M2, D2)

if date1.month == date2.month - 1:
    print(1)
else:
    print(0)

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

if a[0] == b[0]:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if D2==1:
    print(1)
else:
    print(0)

Solution (Python):
import sys
import numpy as np
sys.setrecursionlimit(10 ** 9)

stdin = sys.stdin
 
ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))
rs = lambda: stdin.readline().rstrip()  

M1, D1 = rl()
M2, D2 = rl()
print(1 if M1 != M2 else 0)

Solution (Python):
M, D = map(int, input().split())
M1, D1 = map(int, input().split())
day = [31, 28, 31, 30, 31,30, 31, 31,30,31,30,31,]

if D == day[M-1]:
  print(1)
else:
  print(0)

Solution (Python):
A,B=map(int,input().split())
C,D=map(int,input().split())

if D==1:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int,input().split(' '))
m2, d2 = map(int,input().split(' '))
print(0 if m1 == m2 else 1)

Solution (Python):
m1,d1=input().split()
m2,d2=input().split()

if m1 == m2:
  print(int(0))
else:
  print(int(1))

Solution (Python):
M1, D1 = [int(x) for x in input().split()]
M2, D2 = [int(x) for x in input().split()]

if D2==1:
  print(1)
else:
  print(0)

Solution (Python):
Mone = int(str(input()).split()[0])
Mtwo = int(str(input()).split()[0])

if(Mone == Mtwo):
    print("0")
else:
    print("1")

Solution (Python):
if __name__ == '__main__':
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())
    month =[2,4,6,9,11]

    if m1 in month:
        if m1 ==2:
            if d1 ==28:
                print(1)
            else:
                print(0)
        else:
            if d1 ==30:
                print(1)
            else:
                print(0)
    else:
        if d1 ==31:
            print(1)
        else:
            print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):


from pprint import pprint
import sys

def solve(m1, d1, m2, d2):
    if m1 != m2:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    m1, d1 = map(int, sys.stdin.readline().strip().split(" "))
    m2, d2 = map(int, sys.stdin.readline().strip().split(" "))
    solve(m1, d1, m2, d2)

Solution (Python):
M = [input().split()[0] for _ in range(2)]
if M[0] == M[1]:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1 = list(map(int,input().split()))
M2,D2 = list(map(int,input().split()))

if M1 == 4 or M1 == 6 or M1 == 9 or M1 == 11:
    if D1 == 30:
        print(1)
    else:
        print(0)
elif M1 == 2:
    if D1 == 28:
        print(1)
    else:
        print(0)
else:
    if D1 == 31:
        print(1)
    else:
        print(0)

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

if a != c:
  print(1)
else:
  print(0)

Solution (Python):
m, d = map(int, input().split())
M, D = map(int, input().split())
if M == m + 1:
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = map(int,input().split(' '))
m2,d2 = map(int,input().split(' '))
if m2==m1+1 and d1+1!=d2:
	print(1)
else:
	print(0)

Solution (Python):
m1 ,n1 = map(int,input().split())
m2,n2 = map(int,input().split())

mlis = [0,2,3,4,5,6,7,8,9,10,11,12,1]

if m2 == mlis[m1]:
    print(1)
else:
    print(0)

Solution (Python):
a,b  = [int(x) for x in input().split()]
c,d  = [int(x) for x in input().split()]
if c-a == 1:
    print("1")
else:
    print("0")

Solution (Python):
M1 , D1 = map(int,input().split())
M2 , D2 = map(int,input().split())

if D1 == D2-1:
    print(0)
else:
    print(1)

Solution (Python):
from sys import stdin
a = [int(x) for x in stdin.readline().rstrip().split()]
s = [int(x) for x in stdin.readline().rstrip().split()]
if s[1] == 1:
    print(1)
else:
    print(0)

Solution (Python):

M1, D1= map(int, input().split())
M2, D2= map(int, input().split())

ans = 0

if M1 != M2:
    ans = 1

print(ans)

Solution (Python):
m1, d1 = list(map(int, input().split()))
m2, d2 = list(map(int, input().split()))

ans = 0
if m2 == m1+1:
    if d2 == 1:
        ans = 1
print(ans)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
  
if D2==1:
	print('1')
else:
	print('0')

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
  print(1)
else:
  print(0)

Solution (Python):
M1,D1 = list(map(int, input().split()))
M2,D2 = list(map(int, input().split()))
if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
import sys

f = sys.stdin
m1, d1 = map(int, f.readline().split(' '))
m2, d2 = map(int, f.readline().split(' '))

result = 0

if m2 - m1 == 1:
    result = 1
if m1 == 12 and m2 == 1:
    result = 1

print(result)

Solution (Python):
M1, D1 = list(map(int, input().split()))
M2, D2 = list(map(int, input().split()))

if M1==M2:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())

if M1!=12:
    if M1<M2:
        print(str(1))
    else:
        print(str(0))
else:
    if M1>M2:
        print(str(1))
    else:
        print(str(0))

Solution (Python):
M_1, D_1 = map(int,input().split())
M_2, D_2 = map(int,input().split())

if M_1 != M_2:
  print('1')
else:
  print('0')

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
if a==c: print(0)
else:print(1)

Solution (Python):
import numpy as np

s1=np.array(input().split(),dtype=np.int32)
s2=np.array(input().split(),dtype=np.int32)

M=[1,2,3,4,5,6,7,8,9,10,11,12]

m=s1[0]
idx=M.index(m)
if(s2[0]==M[(idx+1)%len(M)]):
    print(1)
else:
    print(0)

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())

if m1 != m2:
    print("1")
else:
    print("0")

Solution (Python):
m1d1 = input()
m2d2 = input()
m1, d1 = m1d1.split()
m2, d2 = m2d2.split()

if m1 == m2 :
    print(0)
else :
    print(1)

Solution (Python):
m1, d1 = input().split()
m2, d2 = input().split()
m = int(m2) - int(m1)

if m == 1 and int(d2) == 1:
    print(1)
else :
    print(0)

Solution (Python):
a=input().split()
b=input().split()

if(int(a[0])<int(b[0])):
    print(1)
else:
    print(0)

Solution (Python):


import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 






m1,d1 = [int(i) for i in readline().split()]
m2,d2 = [int(i) for i in readline().split()]


if m1 == m2: print(0)
else: print(1)

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
if a==c:
  print(0)
else:
  print(1)

Solution (Python):
import sys
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

lis_31 = [1, 3, 5, 7, 8, 10, 12]
lis_30 = [4, 6, 9, 11]
lis_28 = 2

if M1 in lis_31 and D1 == 31:
    if M2 == M1 + 1 and D2 == 1:
        print(1)
        sys.exit()
if M1 in lis_30 and D1 == 30:
    if M2 == M1 + 1 and D2 == 1:
        print(1)
        sys.exit()
if M1 == 2 and D1 == 28:
    if M2 == M1 + 1 and D2 == 1:
        print(1)
        sys.exit()
print(0)

Solution (Python):
a = [31, 28, 31,30,31,30,31,31,30,31,30,31]
d = {a: 0 for a in xrange(1,13)}

for b in xrange(1,13):
    d[b] = a[b-1]

m1, d1 = map(int, raw_input().split())
m2, d2 = map(int, raw_input().split())

if d1 == d[m1]:
    print 1
else:
    print 0

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
if a != c:
  print('1')
else:
  print('0')

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

print(0 if M1 == M2 and D2-D1 == 1 else 1)

Solution (Python):
m1,d1 = (int(x) for x in input().split())
m2,d2 = (int(x) for x in input().split())

if m1 != m2:
  print("1")
else:
  print("0")

Solution (Python):
M1, D1 = map(int,input().split())
M2, D2 = map(int,input().split())

n = [-1,31,28,31,30,31,30,31,31,30,31,30,31]

if D1 == n[M1]:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
yes = 1
no = 0
if d2 == 1:
    print(yes)
else:
    print(no)

Solution (Python):
input1 = input()
input2 = input()
inputbox1 = input1.split()
inputbox2 = input2.split()

if inputbox1[0] == inputbox2[0]:
    print("0")
else:
    print("1")

Solution (Python):

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if d2 == 1:
	print(1)
else:
	print(0)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if D2 == 1:
    print(1)
else:
    print(0)

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

if a!=c:
	print("1")
else:
	print("0")

Solution (Python):
M1, D1 = input().split()
M2, D2 = input().split()

if M1 == M2:
    print('0')
else:
    print('1')

Solution (Python):
M1, D1 = map(int, input().split(" "))
M2, D2 = map(int, input().split(" "))

if M1 == M2:
  print(0)
else:
  print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
print(int(a != c))

Solution (Python):

a,b=map(int,input().split())
c,d=map(int,input().split())
if a==c:
    print(0)
else:
    print(1)

Solution (Python):
a, b = map(int, input().split(' '))
c, d = map(int, input().split(' '))

if a != c:
  print(1)
else:
  print(0)

Solution (Python):


M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())
if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())

if m1 == m2:
    print(0)
else:
    print(1)

Solution (Python):
m1, d2 = map(int, input().split())
m2, d2 = map(int, input().split())

if m2 - m1 == 1:
    print(1)

if m2 - m1 == 0:
    print(0)

Solution (Python):
end = ['31', '28','31','30','31','30','31','31','30','31','30','31']
m1, d1, =input().split(' ')
m2, d2, =input().split(' ')

if end[int(m1) - 1] == d1:
    print('1')
else:
    print('0')

Solution (Python):
a,b=map(int, input().split())
c,d=map(int, input().split())
if b+1 !=d:
    print(1)
else:
    print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
if(a!=c):print(1)
else:print(0)

Solution (Python):
a, b =map(int,input().split())
c, d =map(int,input().split())
if a == c:
    print('0')
else:
    print('1')

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if m1 == m2:
    print(0)

else:
    print(1)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())


if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
import calendar

D1, D2 = map(int, input().split())
_, lastday = calendar.monthrange(2019,D1)

if lastday == D2:
   print(1)
else:
   print(0)

Solution (Python):
M1,D1 = map(int, input().split())
M2,D2 = map(int, input().split())
print(1 if M1<M2 else 0)

Solution (Python):

a,b = map(int,input().split())
c,d = map(int,input().split())
if a == c: print(0)
else: print(1)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
input()
M, D = map(int, input().split())
if D == 1:
    print(1)

else:
    print(0)

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
print(1 if m1!=m2 else 0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M2 - M1 == 0:
  print(0)
else:
  print(1)

Solution (Python):
s = input().split()
t = input().split()
if s[0] != t[0]:
  print("1")
else:
  print("0")

Solution (Python):
m1,d1 = map(int, input().split())
m2,d2 = map(int, input().split())

print("1" if not m1==m2 else "0")

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(m1, d1, m2, d2):
    return 0 if m1 == m2 else 1


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    m1 = int(parsed_lines[0][0])
    d1 = int(parsed_lines[0][1])
    m2 = int(parsed_lines[1][0])
    d2 = int(parsed_lines[1][1])
    
    return m1, d1, m2, d2


if not do_submit:
    m1, d1, m2, d2 = input_parse("""
    11 16
    11 17
    """)
    print(sol(m1, d1, m2, d2))

    m1, d1, m2, d2 = input_parse("""
    11 30
    12 1
    """)
    print(sol(m1, d1, m2, d2))

else:
    m1, d1 = list(map(int, input().split()))
    m2, d2 = list(map(int, input().split()))
    
    
    
    print(sol(m1, d1, m2, d2))

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

print("1" if m1 != m2 else "0")

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
day1 = list(map(int, input().split()))
day2 = list(map(int, input().split()))

if day2[1] == 1:
    print("1")
else:
    print("0")

Solution (Python):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
if D2==1:
  print(1)
else:
  print(0)

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

if d==1:
  print("1")
else:
  print("0")

Solution (Python):
m1,d1=map(int,input().split())
m2,d2=map(int,input().split())
if d2==d1+1:
    print(0)
else:
    print(1)

Solution (Python):
m1,d1 = map(int, input().split())
m2,d2 = map(int, input().split())

if m2 != m1:
  print(1)
else:
  print(0)

Solution (Python):
M, D = map(int,input().split())
N, E = map(int,input().split())
if E == 1:
    print(1)
else:
    print(0)

Solution (Python):
m,d=map(int,input().split())
M,D=map(int,input().split())

if D==1 and M==m+1:
    print(1)
elif m==12 and M==1:
    print(1)
else:
    print(0)

Solution (Python):
a, b = map(int,input().split())
c, d = map(int,input().split())
if d ==1:
  print(1)
else:
  print(0)

Solution (Python):
m1, d1 = map(int,input().split())
m2, d2 = map(int, input().split())
if m2 > m1:
  print(1)
else:
  print(0)

Solution (Python):
import math
import sys


(M1,D1) = map(int,input().split())
(M2,D2) = map(int,input().split())

if D1 < D2: 
    print(0)
else:
    print(1)

Solution (Python):



M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if int(D2) == 1:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 != m2:
    print(1)
else:
    print(0)

Solution (Python):
def main():
    m1, _ = map(int, input().split())
    m2, _ = map(int, input().split())

    print(1 if m1 != m2 else 0)


if __name__ == '__main__':
    main()

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 == 1:
    print(1)
else:
    print(0)

Solution (Python):
a,b = map(int,input().split())
c,d = map(int,input().split())
print(0 if d-b>0 else 1)

Solution (Python):
m1, d1 = input().split()
m2, d2 = input().split()
if m1 == m2:
    print(0)
else:
    print(1)

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

if d==1:
    print(1)
else:
    print(0)

Solution (Python):
a,b = input().split()
c,d = input().split()
if a == c:
    ans = 0
else:
    ans = 1
print(ans)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int ,input().split())

sanju = [4,6,9,11]
ans = 0

if m1 in sanju:
	if d1 == 30:
		if m2 == m1+1 and d2 == 1:
			ans = 1
elif m1 == 2:
	if d1 == 28:
		if m2 == m1+1 and d2 == 1:
			ans = 1
else:
	if d1 == 31:
		if m2 == m1+1 and d2 == 1:
			ans = 1

print(ans)

Solution (Python):


M1, D1 = map(int, input().split(' '))
M2, D2 = map(int, input().split(' '))

if D1 > D2 and M1 != M2:
    print(1)
else:
    print(0)

Solution (Python):
M1,D1 = map(int,input().split())
M2,D2 = map(int,input().split())

if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
M1,D1 = list(map(int,input().split()))
M2,D2 = list(map(int,input().split()))
if M1 == M2:
    print(0)
else:
    print(1)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    M1, D1 = map(int, input().split())
    M2, D2 = map(int, input().split())
    print(int(D1 + 1 != D2))


main()

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if D2 == D1 + 1:
    print(0)
else:
    print(1)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

lst = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

print(int(m1 != m2 and lst[m1] == d1))

Solution (Python):
m1,d1 = map(int,input().split())
m2,d2 = map(int,input().split())
if m1 == m2:
  print(0)
else:
  print(1)

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

print('1' if not a == c else '0')

Solution (Python):
m, d = map(int, input().split())

if d == 28 and m == 2:
  print(1)
elif d == 30 and m in [4,6,9,11]:
  print(1)
elif d == 31 and m in [1, 3, 5, 7, 8, 10, 12]:
  print(1)
else:
  print(0)

Solution (Python):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())

if M1 != M2:
  print(1)
else:
  print(0)

Solution (Python):
m, d = map(int, input().split())
m2, d2 = map(int, input().split())

if m == m2:
  print(0)
else:
  print(1)

Solution (Python):

M,D = map(int,input().split())
M,D = map(int,input().split())
if D==1:
  print(1)
else:
  print(0)

Solution (Python):
md1 = list(map(int, input().split()))
md2 = list(map(int, input().split()))


if md1[0] == md2[0]:
	print(0)
else:
	print(1)