PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000072. Fadi và bội chung nhỏ nhất (Fadi and LCM)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Fadi và bội chung nhỏ nhất (Fadi and LCM)
Fadi and LCM
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Fadi is given a positive integer . Choose positive integers with least common multiple exactly . Among all such pairs, minimize . If several optimal pairs exist, output any of them.
Input
One integer .
Output
Print two positive integers and having LCM and the minimum possible value of .
Subtasks
-
Subtask 1 (20 points): .
-
Subtask 2 (30 points): .
-
Subtask 3 (50 points): .
Examples
Input
6
Output
2 3
Explanation
and . Two numbers both at most cannot have LCM , so the pair is optimal.