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

#GL0000074. Cân bằng ƯCLN và BCNN (GCD vs LCM)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Cân bằng ƯCLN và BCNN (GCD vs LCM)

GCD vs LCM

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive integer nn, find four positive integers a,b,c,da,b,c,d whose sum is nn and such that gcd⁡(a,b)=lcm⁡(c,d)\gcd(a,b)=\operatorname{lcm}(c,d). A solution always exists; any valid quadruple is accepted.

Input

One integer nn.

Output

Print four positive integers a,b,c,da,b,c,d in this order.

Subtasks

  • Subtask 1 (20 points): 4≤n≤1004\le n\le100.

  • Subtask 2 (30 points): 4≤n≤1064\le n\le10^6.

  • Subtask 3 (50 points): 4≤n≤1094\le n\le10^9.

Examples

Input

7

Output

4 1 1 1

Explanation

All four numbers are positive and sum to 4+1+1+1=74+1+1+1=7. Also, gcd⁡(4,1)=1=lcm⁡(1,1)\gcd(4,1)=1=\operatorname{lcm}(1,1), so the construction is valid.