1 2 3 3 1 2
SAME
a = set(map(int, input().split())) b = set(map(int, input().split())) print('SAME' if a == b else 'DIFFERENT')