A = input() B = input() def check(strA, strB): for i in range(strA): frag = False for j in range(strB): if i == j: frag = True if frag == False: return False if check(A, B): print(True) else: print(False)