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

Bài tập thuộc lộ trình

1 lộ trình

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 11 that has a positive divisor other than 11 and itself. For example, 4=2⋅24=2\cdot2 and 9=3⋅39=3\cdot3 are composite, while 11 is not.

Given an integer n≥12n\ge12, find composite integers xx and yy, both smaller than nn, such that x+y=nx+y=n. The two values need not be different. Any valid pair is accepted.

Input

One line containing integer nn.

Output

Print two composite integers xx and yy, separated by a space, satisfying 1<x<n1<x<n, 1<y<n1<y<n, and x+y=nx+y=n.

Subtasks

  • Subtask 1 (20 points): 12≤n≤10012\le n\le100.
  • Subtask 2 (30 points): 12≤n≤10412\le n\le10^4.
  • Subtask 3 (50 points): 12≤n≤10612\le n\le10^6.

Examples

Input

15

Output

9 6

Explanation

Here n=15n=15. We choose x=9=3⋅3x=9=3\cdot3 and y=6=2⋅3y=6=2\cdot3. Both numbers are composite, greater than 11 and smaller than 1515, and 9+6=159+6=15. Thus 9 6 is a valid answer; it is not required to be unique.