Equality Check
Time limit1sMemory limit512 MB
Read a quiz line formatted as 'a + b = c' and print YES if a + b equals c, otherwise NO.
- Level
Easy1 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
You are grading an arithmetic quiz. The quiz asks a student for the sum of two numbers, and the student writes down one answer. Decide whether that answer is correct.
Input
The first and only line contains a string of the form a + b = c. Each of , , is a single-digit positive integer, so . The line is exactly 9 characters long, with one space between every number and symbol.
Output
Print YES on the first line if the sum is correct, and NO otherwise.