시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 9 6 6 66.667%

문제

여섯 개의 간단한 방정식이 주어진다. 이 때, 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이 주어진다.

출력

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

예제 입력 1

6 20 35 10 39 77

예제 출력 1

2 3 13 11 7 5
W3sicHJvYmxlbV9pZCI6Ijk3NjUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1ZWNcdWMxMmYgXHViYzI5XHVjODE1XHVjMmRkIiwiZGVzY3JpcHRpb24iOiI8cD5cdWM1ZWNcdWMxMmYgXHVhYzFjXHVjNzU4IFx1YWMwNFx1YjJlOFx1ZDU1YyBcdWJjMjlcdWM4MTVcdWMyZGRcdWM3NzQgXHVjOGZjXHVjNWI0XHVjOWM0XHViMmU0LiBcdWM3NzQgXHViNTRjLCB4PHN1Yj4xPFwvc3ViPiwgeDxzdWI+MjxcL3N1Yj4sIHg8c3ViPjM8XC9zdWI+LCB4PHN1Yj41PFwvc3ViPiwgeDxzdWI+NjxcL3N1Yj4sIHg8c3ViPjc8XC9zdWI+XHViOTdjIFx1Y2MzZVx1YjI5NCBcdWQ1MDRcdWI4NWNcdWFkZjhcdWI3YThcdWM3NDQgXHVjNzkxXHVjMTMxXHVkN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