import Data.Bool

main :: IO ()
main = do
  (a:b:_) <- map read . words <$> getLine
  putStr $ solve a b

solve :: Int -> Int -> String
solve a b = bool "No" "Yes" $ isSqNum $ connect a b

isSqNum :: Int -> Bool
isSqNum x = x `elem` sqNums

sqNums :: [Int]
sqNums = [ x ^ 2 | x <- [0 ..] ]

connect :: Int -> Int -> Int
connect a b = a * k + b
  where k = head [ 10 ^ i | i <- [0 ..], 10 ^ i > b ] 
