#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include ///////// #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define P(p) cout<<(p)<>T>>A>>B; //T回連続移動で(A,B)へ int min; if(A>B){ min = A; }else { min = B; } if(T < min){ P("NO"); return 0; } else if( A==0 && B==0){ if(T==1){P("NO");} else if(T%2==0){ P("YES"); rep(i,T/2) cout<<"<\n>\n"; } else{ P("YES"); cout<<">\n^\n\n"; } return 0; } P("YES"); if( (T -min)%2 == 0){ //if(T==min) { if(A==B){ rep(i,min){cout << "^>\n";}//右上 rep(i,(T-min)/2){ cout<<"<\n>\n"; } }else if(A>B){ rep(i,B){cout<<"^>\n";} rep(i,A-B){cout<<"^\n";} rep(i,(T-min)/2){ cout<<"<\n>\n"; } }else{//A\n";} rep(i,B-A){cout<<">\n";} rep(i,(T-min)/2){ cout<<"<\n>\n"; } } } }else{//(T -min)%2 == 1) { if(A==B){ rep(i,min-1){cout << "^>\n";} cout<<"^\n>\n"; rep(i,(T-min)/2){ cout<<"<\n>\n"; } }else if(A>B){ rep(i,B){cout<<"^>\n";} rep(i,A-B-1){cout<<"^\n";} cout<<"<\n^>\n"; rep(i,(T-min)/2){ cout<<"<\n>\n"; } }else{//A\n";} rep(i,B-A-1){cout<<">\n";} cout<<"^\nv>\n"; rep(i,(T-min)/2){ cout<<"<\n>\n"; } } } } return 0; }