class Yukicoder LAST_ONE = %w(x > ^ ^>) def initialize t, y, x = gets.chomp.split.map(&:to_i) m = [y,x].max n = [y,x].min ty = y-1 tx = x-1 tm = [ty,tx].max tn = [ty,tx].min answer = [] if m > t puts "NO" return else if t == 1 if y == 0 && x == 0 puts "NO" return else puts LAST_ONE[y*2+x] end else if ty < 0 if tx == 0 answer << ['v'] t -= 1 else answer << ['v>'] answer << ['>'] * (tx-1) t -= tx end elsif tx < 0 if ty == 0 answer << ['<'] t -= 1 else answer << ['<^'] answer << ['^'] * (ty-1) t -= ty end elsif ty > tx answer << ['^>'] * tx answer << ['^'] * (ty-tx) t -= ty elsif ty < tx answer << ['^>'] * ty answer << ['>'] * (tx-ty) t -= tx else answer << ['^>'] * ty t -= ty end if t.odd? if t > 1 answer << ['>','<'] * ((t-1)/2) end answer << '^>' else if t > 2 answer << ['>','<'] * ((t-1)/2) end answer << ['>','^'] end end end puts "YES" puts answer end end Yukicoder.new