def main(): x, y = map(int, input().split()) s = {x, y} for v in (x, y): s.add((v + 4) % 12) s = s - {x, y} print(*s) main()