rplc :: Char -> Char -> String -> String
rplc _ _ ""     = ""
rplc a b (x:xs)
 | a == x    = b : rplc a b xs
 | otherwise = x : rplc a b xs

rplcs :: String -> [String]
rplcs s = s : afters ++ concat (map rplcs afters)
 where lowers = ['a'..'z']
       afters = [rplc c1 c2 s | c1 <- lowers, c2 <- lowers, c1 /= c2]

main = do
  s <- getLine
  t <- getLine
  if elem t (rplcs s) then putStrLn "Yes" else putStrLn "No" 