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
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
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 for distinct primes . Determine whether can be expressed as the sum of two valid semiprimes; the summands may be equal.
Input
One integer .
Output
Print YES if the representation exists, otherwise print NO.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Example
Input
30
Output
YES
Explanation: , and is a product of distinct primes.