시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 10 7 7 70.000%

문제

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