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

#SP0000182. Chef và tổng hai bán nguyên tố (Chef and Semi-Primes)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Chef và tổng hai bán nguyên tố (Chef and Semi-Primes)

Chef and Semi-Primes

Phuoc Hung OJ ID: PRIME000187
Original source: CodeChef CHEFPRMS

Problem statement

A valid semiprime is p⋅qp\cdot q for distinct primes p,qp,q. Determine whether NN can be expressed as the sum of two valid semiprimes; the summands may be equal.

Input

One integer NN.

Output

Print YES if the representation exists, otherwise print NO.

Subtasks

  • Subtask 1 (20 points): 1≤N≤701\le N\le 70.
  • Subtask 2 (30 points): 71≤N≤13071\le N\le 130.
  • Subtask 3 (50 points): 131≤N≤200131\le N\le 200.

Example

Input

30

Output

YES

Explanation: 30=15+1530=15+15, and 15=3⋅515=3\cdot5 is a product of distinct primes.