PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000106. Bài toán ƯCLN của ba số (GCD Problem)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Bài toán ƯCLN của ba số (GCD Problem)
GCD Problem
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Given a positive integer , find three pairwise distinct positive integers such that and . A solution is guaranteed to exist. Any valid triple is accepted.
Input
One line containing integer .
Output
Print three integers in that order.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
18
Output
6 9 3
Explanation
The integers are distinct, sum to , and .