Under construction

Still being built. Things may change

Sum

Time limit2sMemory limit1024 MB

Summary
Given three huge numbers A, B, and C, the task asks whether zeros can be appended to A and B so that their sum equals C, and to print the counts.
Level

Medium4 of 10

Topics
String, Implementation, Math
Solved
No attempts yet

Statement

Vasya likes to look for patterns in everything. His notebook has three numbers AA, BB, and CC, and he wants to find a simple relation between them. First, he wants to know whether zeros can be appended to the ends of these numbers so that the sum of the first two equals the third. For example, if his notebook has 9, 34, and 43, he does not need to append any zeros, because 9 + 34 is already 43. If the notebook has 23, 7, and 93, he can append a zero to 7 to get 70. Then 23 + 70 = 93.

You are given three positive integers AA, BB, and CC. Find non-negative integers nn, mm, and kk such that A×10n+B×10m=C×10kA \times 10^n + B \times 10^m = C \times 10^k.

Input

The first line contains the number AA, the second line contains BB, and the third line contains CC. Every number is at least 1 and at most 1010000010^{100000}.

Output

If there are numbers nn, mm, and kk that satisfy the condition, print YES on the first line and the numbers nn, mm, and kk on the second line. The numbers must be non-negative and must not exceed 10610^6. If there are several solutions, print any of them. If no such numbers exist, print NO.

Examples3

  1. Example 1

    Input
    9
    34
    43
    
    Expected output
    YES
    0 0 0
    
  2. Example 2

    Input
    23
    7
    93
    
    Expected output
    YES
    0 1 0
    
  3. Example 3

    Input
    1
    2
    4
    
    Expected output
    NO