{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
import qualified Data.ByteString.Char8 as BS
import           Data.Maybe            (fromJust)

main :: IO ()
main = do
  [a, b] <- map readInt . BS.words <$> BS.getLine
  putStrLn $ if solve a b then "Yes" else "No"

solve :: Int -> Int -> Bool
solve a b = elem (read (show a ++ show b)) squareNumbers

squareNumbers :: [Int]
squareNumbers = takeWhile (< 100100) $ map (^ (2 :: Int)) [1 .. ]

readInt :: BS.ByteString -> Int
readInt = fst . fromJust . BS.readInt
