9162: Fair Equation

内存限制:128 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:1 通过:1

题目描述



Equations are not solvable in a general fashion. Here's an example.

It's not fair to solve unsolvable problems in the contest, so we would like you to solve a easier one. It's decidable in polynomial time, so it's fair.

Xiao Shi is given an equation of the form A+B=CA + B = CA+B=C, where AAA, BBB and CCC are positive integers. However, the equation may not be true at the moment. Xiao Shi can insert a single digit (000-999) anywhere in the equation, before or after any existing digit, to make it true.

For example, if the equation is 12+34=14612 + 34 = 14612+34=146, Xiao Shi can insert 111 to 121212 (either 1‾12\overline{1}12112 or 11‾21\overline{1}2112) to make it 112+34=146112 + 34 = 146112+34=146.

Xiao Fan's task is to determine if there exists a way to insert a digit in the equation to make it true, or it is already true. Can you help him?

输入格式


The first and only line of input contains an equation of the form A+B=CA + B = CA+B=C, where AAA, BBB and CCC are positive integers with no leading zeros. The input satisfies 1≤A,B,C≤1061 \leq A, B, C \leq 10^61A,B,C106.
It's guaranteed that there are exactly one space before and after +\texttt{+}+ and =\texttt{=}=.

输出格式


If there exists a way to insert a digit in the equation to make it true, or it is already true, output Yes\texttt{Yes}Yes and the modified equation on two separate lines. Please note that the equation should be presented like input format, i.e., no leading zeros and exactly one space before and after +\texttt{+}+ and =\texttt{=}=.
Otherwise, output No\texttt{No}No on a single line.

输入样例 复制

12 + 34 = 146

输出样例 复制

Yes
112 + 34 = 146

分类标签