s1 = input()
s2 = input()

print(s1 == s2, s1.lower() == s2.lower(), sep='\n')