PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000114. Phân tích số thành hai hợp số (Design Tutorial: Learn from 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
Phân tích số thành hai hợp số (Design Tutorial: Learn from Math)
Design Tutorial: Learn from Math
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
A composite number is an integer greater than that has a positive divisor other than and itself. For example, and are composite, while is not.
Given an integer , find composite integers and , both smaller than , such that . The two values need not be different. Any valid pair is accepted.
Input
One line containing integer .
Output
Print two composite integers and , separated by a space, satisfying , , and .
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
15
Output
9 6
Explanation
Here . We choose and . Both numbers are composite, greater than and smaller than , and . Thus 9 6 is a valid answer; it is not required to be unique.