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):
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,b=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 (1) if d2 == 1 else print (0)

Solution (Python):
M1,D1 = (int(T) for T in input().split())
M2,D2 = (int(T) for T in input().split())
print(['0','1'][M1!=M2])

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,d = map(int,input().split())
m2,d2 = map(int,input().split())
print(1 if m != m2 else 0)

Solution (Python):
a,b=map(int,input().split())
c,d=map(int,input().split())
print([0,1][a==c-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, _ = map(int, input().split())
M2, _ = map(int, input().split())
ans = 1 if M1 != M2 else 0
print(ans)

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

Solution (Python):
n,m = map(int,input().split())
x,y = map(int,input().split())
if n!=x:
    print(1)
else:
    print(0)

Solution (Python):
n,m = map(int,input().split())
x,y = map(int,input().split())
if n!=x:
    print(1)
else:
    print(0)

Solution (Python):
MD = [map(int, input().split()) for _ in range(2)]
M, D = [list(i) for i in zip(*MD)]

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

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

Solution (Python):
m1,_ = map(int,input().split())
m2,_ = 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 m1 == m2:
    print('0')
else:
    print('1')

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

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

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

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

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


if __name__ == '__main__':
    main()

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

import sys
def input():
    return sys.stdin.readline()[:-1]

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):
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, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


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


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


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

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


def main():
    solve()


if __name__ == '__main__':
    main()

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 + 1 == m2:
    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):
def main():
    m1, d1 = map(int, input().split())
    m2, d2 = map(int, input().split())

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


if __name__ == "__main__":
    main()

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 d == 1:
  print(1)
else:
  print(0)

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

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

Solution (Python):
l=[31,28,31,30,31,30,31,31,30,31,30,31]
s=list(map(int,input().split()))
d=list(map(int,input().split()))
x=l[s[0]-1]
if(x!=s[1]):
    print(0)
else:
    print(1)

Solution (Python):
a, b = map(int, input().split())
c, d = map(int, input().split())
print(1 if c != a else 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())
print(1 if m1 +1 == m2 else 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):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

a,b = MI()
c,d = MI()

print(1 if d == 1 else 0)

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())

a,b = MI()
c,d = MI()

print(1 if b+1 != d else 0)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()

md1 = inl()
md2 = inl()


def solve():
    return md1[0] < md2[0]


print(1 if solve() 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):
M1, D1 = map(int, input().split())
M2, D2 = map(int, input().split())
print(1 if M2 == M1 + 1 and D2 == 1 else 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):
a=input().split()
b=input().split()
print(int(b[1]=="1"))

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

Solution (Python):
a,b = map(int,input().split())
c,d = map(int,input().split())
if ((a+1)==c or (a==12 and c==1)):
  if 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):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
ok = False
if d1+1 != d2:
    ok = True
if ok:
    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):
x=input().split()
y=input().split()
if(x[0]!=y[0]):
    print("1")
else:
    print("0")

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

Solution (Python):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    a, _ = na()
    b, _ = na()
    print(b-a)

if __name__ == "__main__":
    main()

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

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

print(1 if md1[0]!=md2[0] 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):
*m1,=map(int,input().split())
*m2,=map(int,input().split())
if m1[0]!=m2[0]:
  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('1' if d2 == 1 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):
M1,D1=map(int,input().split())
M2,D2=map(int,input().split())
print(1 if D2==1 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):
M1,D1 = input().split()
M2,D2 = input().split()

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

Solution (Python):
print(1 if input().split()[0]!=input().split()[0] else 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):

import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


M_1, D_1 = zz()
M_2, D_2 = zz()
if (M_1 == M_2):
    print(0)
else:
    print(1)

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

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

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

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

Solution (Python):


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
m,d=MI()
M,D=MI()
if m!=M:
    print(1)
else:
    print(0)

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
print(1 if m1+1 == 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):
print(int(input().split()[0] != input().split()[0]))

Solution (Python):
import sys, math
from functools import lru_cache
from collections import deque
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    M, D = i2(2)
    if M[0] != M[1]:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Solution (Python):
d1 = input().split()[0]
d2 = input().split()[0]

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

Solution (Python):
m1, _ = [int(i) for i in input().split()]
m2, _ = [int(i) for i in 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 sys

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

import datetime
import calendar
def get_last_date(dt):
    return dt.replace(day=calendar.monthrange(dt.year, dt.month)[1])

dt = datetime.datetime(2019, M1, D1)

if dt ==get_last_date(dt):
    print(1)
else:
    print(0)

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

Solution (Python):
import sys
read = sys.stdin.readline
import time
import math
import itertools as it
def inp():
    return int(input())
def inpl():
    return list(map(int, input().split()))
st = time.perf_counter()


A = inpl()
B = inpl()
if A[0] != B[0]:
    print(1)
else:
    print(0)


ed = time.perf_counter()
print('time:', ed-st, file=sys.stderr)

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,_ = input().split()
m2,_ = input().split()
ans = 0

if m1 != m2:
    ans = 1

print(ans)

Solution (Python):
print(+(' 1\n'in[*open(0)][1]))

Solution (Python):
print(+(' 1\n'in[*open(0)][1]))

Solution (Python):
print(1//int([*open(0)][1][2:]))

Solution (Python):
print(1//int([*open(0)][1][2:]))

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

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

Solution (Python):
import math
import sys
readline = sys.stdin.readline


def main():
    m1, d1 = map(int, readline().rstrip().split())
    m2, d2 = map(int, readline().rstrip().split())
    print(1 if d2 == 1 else 0)


if __name__ == '__main__':
    main()

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 m1 in [1,3,5,7,8,10,12] and d1==31:
  print(1)
elif m1 in [4,6,9,11] and d1==30:
  print(1)
elif m1==2 and d1 in [28,29]:
  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 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):

あ, い, う, え = map(int, open(0).read().split())
if あ - う == 0:
    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):
m, d = map(int,input().split())
n, e = map(int,input().split())
print(int(e == 1))

Solution (Python):
m, d = map(int,input().split())
n, e = map(int,input().split())
print(int(n >= 2 and e == 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 = input().split()
m2, d2 = input().split()
print('1' if m1 != m2 else '0')

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

M1, D1 = MAP()
M2, D2 = MAP()

print(0 if M1==M2 else 1)

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

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 M1!=M2:
  print('1')
else:
  print('0')

Solution (Python):
m1,d1,m2,d2=map(int,open(0).read().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 + 1 == m2 and d2 == 1:
  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):
x,_=map(int, input().split())
y,_=map(int, input().split())
print(1) if (x != y) 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,_ = map(int,input().split())
n,_ = map(int,input().split())
print(int(m!=n))

Solution (Python):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
if m1 + 1 == m2 and 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):
a=list(map(int,input().split()))
b=list(map(int,input().split()))
if a[0]!=b[0]:
    print('1')
else:
    print('0')

Solution (Python):
a, b, c, d = open(0).read().split()
print(1 if a != c else 0)

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

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

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

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

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

Solution (Python):
m1, d1 = [int(_) for _ in input().split()]
m2, d2 = [int(_) for _ in input().split()]
print(1 if m1 != m2 else 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 Counter, defaultdict



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



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

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

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

Solution (Python):
m1,d1=map(int, input().split())
m2,d2=map(int, input().split())
print("1" if m2==m1+1 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):
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 c==a+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 = 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())
    
print(1 if d2 == 1 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):
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 m1==m2 :
  print(0)
else :
  print(1)

Solution (Python):
MD1 = list(map(int, input().split()))
MD2 = list(map(int, input().split()))

if MD1[0] == MD2[0]:
    print(0)
else:
    print(1)

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

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

Solution (Python):
M1,D1 = [ int(i) for i in input().split() ]
M2,D2 = [ int(i) for i in 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):
print(0 if input()[:2] == input()[:2] else 1)

Solution (Python):
pm,pd = map(int,input().split())
nm,nd = map(int,input().split())
print(0 if pm == nm else 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):
print(1-(input()[:2]in input()))

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 sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


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


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


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




a,b = IL()
c,d = IL()
print(int(a!=c))

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 = 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 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):
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

end = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    M1, D1 = map(int, readline().split())
    M2, D2 = map(int, readline().split())
    if M1 != M2:
        print('1')
    else:
        print('0')

if __name__ == '__main__':
    main()

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

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

if y+1 == b:
  print(0)
else:
  print(1)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7


_, D1 = MAP()
_, D2 = MAP()

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

Solution (Python):
import heapq
from sys import stdin
input = stdin.readline




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










     
def main():
    if m1 ==12:
        if m2 == 1 and d2 ==1 :
            print(1)
        else:
            print(0)
    else:
        if m2 ==m1+1 and d2 ==1:
            print(1)
        else:
            print(0)
        
    
    

if __name__ == '__main__':
    main()

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
m1,d1 = readInts()
m2,d2 = readInts()
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(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):
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 D1>=D2:
    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 != c:
  print(1)
else:
  print(0)

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

if __name__ == "__main__":
    main()

Solution (Python):
M,D=map(int, input().split())
MM,DD=map(int, input().split())

if MM-1==M or (MM-1==0 and M==12):
    print(1)
else:
    print(0)

Solution (Python):
import datetime

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())
'''
before = datetime.date(2019, m1, d1)
check = before + datetime.timedelta(day=1)

after = datetime.date(2019, m2, d2)
'''
if (m2 - m1 == 1):
    print(1)
else:
    print(0)