PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000073. Omkar và tiết học Toán cuối cùng (Omkar and Last Class of Math)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Omkar và tiết học Toán cuối cùng (Omkar and Last Class of Math)
Omkar and Last Class of Math
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
Given an integer , choose two positive integers with . Minimize their least common multiple . Any optimal pair is acceptable.
Input
One integer .
Output
Print two positive integers summing to with minimum LCM.
Subtasks
-
Subtask 1 (20 points): .
-
Subtask 2 (30 points): .
-
Subtask 3 (50 points): .
Examples
Input
9
Output
3 6
Explanation
The pair sums to and has LCM . Other unordered pairs , and have LCMs , and respectively. Thus is the minimum.