Divisible By 3

Divisible By 3

Easy Computer Mathematics Integers & Divisibility 35 views
Explanation Complexity

Problem Statement

Check if a number is divisible by 3 and print YES/NO.

Input Format

One integer n.

Output Format

YES or NO.

Example

21
YES

Constraints

|n|

Input / Output Format

Input Format
One integer n.
Output Format
YES or NO.
Constraints
|n|

Examples

Input:
21
Output:
YES

Example Solution (Public)

Computer Mathematics
Compute n % 3. If result is 0 print YES else NO.

Official Solution Code

Compute n % 3. If result is 0 print YES else NO.
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.