import sys

s1 = input()
s2 = input()

print(s1 == s2)

print(s1.lower() == s2.lower())