while True: try: p, p2 = input().split() print('same' if p == p2 else 'different') except EOFError: break