import sequtils,algorithm,math,tables import sets,intsets,queues,heapqueue,bitops,strutils template times*(n:int,body) = (for _ in 0..<n: body) template `max=`*(x,y) = x = max(x,y) template `min=`*(x,y) = x = min(x,y) proc printf(formatstr: cstring){.header: "<stdio.h>", varargs.} proc put(c:char){. importc:"putchar_unlocked",header: "<stdio.h>" .} proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" .} proc scan(): int = while true: let k = getchar_unlocked() if k < '0': break result = 10 * result + k.ord - '0'.ord var t = scan() var a = scan() var b = scan() if t < max(a,b) : quit "NO",0 if a == 0 and b == 0 and t == 1:quit "NO",0 printf("YES\n") if a == 0 and b == 0 and t mod 2 == 1: printf(">\n^\n<v\n") t -= 3 while t >= max(a,b) + 2: t -= 2 put('>') put('\n') put('<') put('\n') if t == max(a,b) + 1: # 斜めのところか 上に登るところで一回余裕を挟む if a == b : printf(">\n^\n") a -= 1 b -= 1 elif a > b: printf("^>\n<\n") a -= 1 else : printf("^>\nv\n") b -= 1 t -= 2 min(a,b).times: put('>') put('^') put('\n') if a > b: (a-b).times: put('^') put('\n') elif b > a: (b-a).times: put('>') put('\n')