f a 0 = a == 0
f a b = a == b^2 || f a (b-1)
g [a,b] 
    | b<10 = a*10 + b
    | b == 100 = a*1000 +100
    | otherwise = a*100 + b
solve a = if f a 316 then "Yes" else "No"
main = getContents>>=putStrLn.solve.g.map read.words