시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
10 초 256 MB 227 79 61 34.078%

문제

엘렌은 학생들에게 초등 수학을 가르치고 있고 곧 기말고사를 앞두고 있다. 기말고사는 n개의 질문들로 이루어져 있다.
각 질문마다 학생들은 한 쌍의 숫자들을 더하거나(+), 빼거나(-) 혹은 곱해야한다(*).

엘렌은 이미 n개의 숫자 쌍들을 골라놨다. 남은것은 이제 각 쌍의 숫자마다 어떠한 연산을 수행해야 할지 결정하는 것이었다.

학생들이 지루하지 않게 하기위해 엘렌은 n개의 연산결과들이 모두 다르게 하고 싶어했다.

엘렌이 시험을 잘 준비 할 수 있게 도와주자.

입력

첫째 줄에 순서쌍의 개수 n (1 ≤ n ≤ 2 500)이 입력된다.

다음 n개의 줄에 걸쳐서 순서쌍 a,b (−106 ≤ a, b ≤ 106)가 입력된다.

출력

입력과 같은 순서대로 (a,b) 순서쌍이 유효한 방정식과 함께 출력된다. 각각의 방정식은 5개의 요소로 나뉜다.
a와 3개의 연산자(+ 혹은 - 혹은  *)중 하나, b 그리고 = 와 연산결과이다. 모든 연산결과는 달라야한다.

만약 출력 할 수 있는 답이 여러개라면 아무거나 출력하고, 답이 없다면 “impossible” 을 출력한다.

예제 입력 1

4
1 5
3 3
4 5
-1 -6

예제 출력 1

1 + 5 = 6
3 * 3 = 9
4 - 5 = -1
-1 - -6 = 5

예제 입력 2

4
-4 2
-4 2
-4 2
-4 2

예제 출력 2

impossible
W3sicHJvYmxlbV9pZCI6IjExNjcwIiwicHJvYmxlbV9sYW5nIjoiMCIsInRpdGxlIjoiXHVjZDA4XHViNGYxIFx1YzIxOFx1ZDU1OSIsImRlc2NyaXB0aW9uIjoiPHA+XHVjNWQ4XHViODBjXHVjNzQwIFx1ZDU1OVx1YzBkZFx1YjRlNFx1YzVkMFx1YWM4YyBcdWNkMDhcdWI0ZjEgXHVjMjE4XHVkNTU5XHVjNzQ0IFx1YWMwMFx1Yjk3NFx1Y2U1OFx1YWNlMCBcdWM3OD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