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

#GL0000192. Tách thành ba thừa số phân biệt (Product of Three Numbers)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Tách thành ba thừa số phân biệt (Product of Three Numbers)

Tách thành ba thừa số phân biệt (Product of Three Numbers)

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given nn, find three pairwise distinct integers a,b,c≥2a,b,c\ge2 with abc=nabc=n, or print NO if none exists. If possible, print YES and any valid triple.

Input

One integer nn.

Output

Print NO, or print YES followed by a,b,ca,b,c on the next line.

Subtasks

  • Subtask 1 (20 points): 2≤n≤100002\le n\le 10000.

  • Subtask 2 (30 points): 2≤n≤100000002\le n\le 10000000.

  • Subtask 3 (50 points): 2≤n≤10000000002\le n\le 1000000000.

Examples

Example 1

Input

64

Output

YES
2 4 8

Explanation

The distinct factors 2,4,82,4,8 are all greater than one, and their product is 6464.

Example 2

Input

32

Output

NO

Explanation

Every factorization of 3232 into three integers greater than one repeats at least one factor, so the answer is impossible.

Example 3

Input

12345

Output

YES
3 5 823

Explanation

The factors 3,5,8233,5,823 are distinct and their product is 1234512345.