There is a right triangle with legs of length *a* and *b*. Your task is to determine whether it is possible to locate the triangle on the plane in such a way that none of its sides is parallel to the coordinate axes. All the vertices must have integer coordinates. If there exists such a location, you have to output the appropriate coordinates of vertices.
The first line contains two integers *a*, *b* (1 ≤ *a*, *b* ≤ 1000), separated by a single space.


x = [0] * 1500
y = [0] * 1500
s = [0] * 1500

def distance(x1, y1, x2, y2):
    return (abs(x1-x2) ** 2 + abs(y1-y2) ** 2) ** (1/2)


for i in range(1,1001):
    for j in range(i,1001):
        k = distance(0,0,i,j)
        if k == int(k):
            x[int(k)] = i
            y[int(k)] = j
            s[int(k)] = 1

t1, t2 = map(int, input().split())

if s[t1] == 1 and s[t2] == 1:
    print("YES")
    print(0, 0)
    print(x[t1], y[t1])
    print(x[t1] + x[t2], y[t1] - y[t2])
else:
    print("NO")