#CCBCMCHIN0000005. Hai cờ logic (Two Logical Flags)
Hai cờ logic (Two Logical Flags)
Two Logical Flags
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given two integers and used as logical flags under C semantics: nonzero means true and zero means false. Determine whether both flags are true.
Input
A single line contains two integers and .
Output
Print YES if and ; otherwise print NO.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Example 1
Input
-2 3
Output
YES
Explanation
The flags are a = -2 and b = 3. A flag is true exactly when it is nonzero. Evaluating both flags gives the result YES.
Example 2
Input
0 7
Output
NO
Explanation
The flags are a = 0 and b = 7. A flag is true exactly when it is nonzero. Evaluating both flags gives the result NO.