str = gets.split t = str[0].to_i tx = str[1].to_i ty = str[2].to_i cx = 0 cy = 0 trace = Array.new count = 0 d = (tx > ty) ? tx : ty diff = t - d if diff < 0 puts "NO" exit end (diff / 2).times do trace.push(">") trace.push("<") count += 2 end if diff % 2 == 1 if tx > 0 && ty > 0 if tx > ty trace.push("^") cy += 1 else trace.push(">") cx += 1 end elsif tx == 0 && ty > 0 trace.push(">") cx += 1 elsif tx > 0 && ty == 0 trace.push("^") cy += 1 else trace.delete_at(trace.length - 1) trace.delete_at(trace.length - 1) trace.push("^") trace.push(">") trace.push("v<") end count += 1 end while count < t do s = "" if cx < tx s += ">" cx += 1 elsif cx > tx s += "<" cx -= 1 end if cy < ty s += "^" cy += 1 elsif cy > ty s += "v" cy -= 1 end trace.push(s) count += 1 end if cx == tx && cy == ty puts "YES" puts trace else puts "NO" end