import sys

str1 = input()
str2 = input()

print(str1 == str2)
print(str1.lower() == str2.lower())