PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000128. Goldbach và Euler (Goldbach and Euler)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Goldbach và Euler (Goldbach and Euler)

Goldbach and Euler

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive integer nn, determine whether it can be represented by two distinct primes p1<p2p_1<p_2 with p1+p2=np_1+p_2=n.

Among all such pairs, select the one with the smallest positive difference p2−p1p_2-p_1. A pair of equal primes is not allowed.

Input

One line containing the integer nn.

Output

If a valid pair exists, print exactly n is the sum of p1 and p2. (including the final period). Otherwise, print exactly n is not the sum of two primes!.

Subtasks

  • Subtask 1 (20 points): 1≤n≤1001\le n\le 100.
  • Subtask 2 (30 points): 1≤n≤100001\le n\le 10000.
  • Subtask 3 (50 points): 1≤n≤1000000001\le n\le 100000000.

Examples

Input

12

Output

12 is the sum of 5 and 7.

Explanation

For n=12n=12, (5,7)(5,7) contains distinct primes with sum 1212 and difference 22. No pair of distinct primes summing to 1212 can have a smaller positive difference. Print 12 is the sum of 5 and 7..