eolymp
bolt
Try our new interface for solving problems
Problems

Extended Euclid Algorithm

Extended Euclid Algorithm

Time limit 1 second
Memory limit 128 MiB

Write a program that finds such x and y that a · x + b · y = 1.

Input data

Two positive integers a and b (1a, b10000).

Output data

If x and y exist, print in the first line YES and in the second line print x and y, otherwise print in one line NO.

Examples

Input example #1
2 1
Output example #1
YES
0 1
Input example #2
2 2
Output example #2
NO