import Control.Applicative main :: IO() main = do [t,a,b] <- map (read::String->Int) . words <$> getLine if check t a b then do putStrLn "YES" mapM_ putStrLn $ route t a b else putStrLn "NO" check t a b | a > t || b > t = False | otherwise = True sign x | x > 0 = 1 | x < 0 = -1 | otherwise = 0 route t a b | a == b = if t''-t' == 0 then replicate min' (diag a b) else ([dir a 0, dir 0 b] ++ replicate (min'-1) (diag a b)) ++ (take t'' (cycle [diag a b, diag (-a) (-b)])) | a /= b = replicate min' (diag a b) ++ route' (t-min') (a-min'*(sign a)) (b-min'*(sign b)) where min' = minimum [abs a,abs b] diag x y | x > 0 && y > 0 = ">^" | x > 0 && y < 0 = ">v" | x < 0 && y > 0 = "<^" | x < 0 && y < 0 = " 0 = ">" | x < 0 = "<" | y > 0 = "^" | y < 0 = "v" t' = t - min' t'' = if t' `mod` 2 == 0 then t' else t' - 1 route' t a b = if t'-t'' == 0 then replicate cnt (dir a b) else ((cor a b) ++ replicate (cnt-1) (dir a b)) ++ (take t'' (cycle ["<",">"])) where dir x y | x > 0 = ">" | x < 0 = "<" | y > 0 = "^" | y < 0 = "v" | otherwise = "" cor x y | x > 0 = [">^","v"] | x < 0 = [" 0 = [">^","<"] | y < 0 = [""] | otherwise = [] cnt = a + b t' = t - cnt t'' = if t' `mod` 2 == 0 then t' else t' - 1