시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 44 28 20 57.143%

문제

여섯 개의 간단한 방정식이 주어진다. 이때, x1, x2, x3, x5, x6, x7를 찾는 프로그램을 작성하시오. x1, x2, x3, x5, x6, x7은 2보다 크거나 같고, 20,000,000보다 작거나 같은 소수이다. 여섯 방정식은 아래와 같다.

  • c1 = x1x2
  • x4 = c4x1
  • c3 = x6x7
  • x8 = x7c2
  • c5 = x2x3
  • c6 = x6x5

c1, c2, c3, c4, c5, c6은 양의 정수로 (20,000,000)2을 넘지 않는다. c1, c2, c3, c4, c5, c6이 주어졌을 때, x1, x2, x3, x5, x6, x7을 푸는 프로그램을 작성하시오. 항상 풀 수 있는 방정식만 입력으로 주어진다. 

입력

첫째 줄에 c1, c2, c3, c4, c5, c6이 주어진다. (c1 ≠ c5, c3 ≠ c6)

출력

x1, x2, x3, x5, x6, x7 를 공백으로 구분해 출력한다. 가능한 답이 여러 가지인 경우, 아무거나 출력한다.

예제 입력 1

6 20 35 10 39 77

예제 출력 1

2 3 13 11 7 5
W3sicHJvYmxlbV9pZCI6Ijk3NjUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1ZWNcdWMxMmYgXHViYzI5XHVjODE1XHVjMmRkIiwiZGVzY3JpcHRpb24iOiI8cD5cdWM1ZWNcdWMxMmYgXHVhYzFjXHVjNzU4IFx1YWMwNFx1YjJlOFx1ZDU1YyBcdWJjMjlcdWM4MTVcdWMyZGRcdWM3NzQgXHVjOGZjXHVjNWI0XHVjOWM0XHViMmU0LiBcdWM3NzRcdWI1NGMsIHg8c3ViPjE8XC9zdWI+LCB4PHN1Yj4yPFwvc3ViPiwgeDxzdWI+MzxcL3N1Yj4sIHg8c3ViPjU8XC9zdWI+LCB4PHN1Yj42PFwvc3ViPiwgeDxzdWI+NzxcL3N1Yj5cdWI5N2MgXHVjYzNlXHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0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