import sys

club = str(input())
club = club.split(' ')
print(str(input()) in club)
# in // not in