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

#SP0000120. Tuyển thủy thủ cho thuyền trưởng Flint (Captain Flint and Crew Recruitment)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Tuyển thủy thủ cho thuyền trưởng Flint (Captain Flint and Crew Recruitment)

Captain Flint and Crew Recruitment

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Captain Flint calls a positive integer vv nearly prime if v=p⋅qv=p\cdot q, where p<qp<q are two distinct prime numbers. For example, 6=2⋅36=2\cdot3 and 10=2⋅510=2\cdot5 are nearly prime, but 4=2⋅24=2\cdot2 is not.

Given nn, determine whether it can be represented as the sum of four pairwise distinct positive integers, with at least three nearly prime summands. Output any valid construction if possible.

Input

One line containing integer nn.

Output

Print NO if impossible. Otherwise, print YES on the first line and four pairwise distinct positive integers summing to nn on the second line, at least three of which are nearly prime.

Subtasks

  • Subtask 1 (20 points): 1≤n≤401\le n\le40.
  • Subtask 2 (30 points): 1≤n≤50001\le n\le5000.
  • Subtask 3 (50 points): 1≤n≤2⋅1051\le n\le2\cdot10^5.

Examples

Input

36

Output

YES
6 10 15 5

Explanation

We have 6=2⋅36=2\cdot3, 10=2⋅510=2\cdot5, and 15=3⋅515=3\cdot5, so at least three summands are nearly prime. The four numbers 6,10,15,56,10,15,5 are pairwise distinct and sum to 3636. The alternative 6,10,14,66,10,14,6 would be invalid because 66 appears twice.