func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     cin >> n >> m;     string h, v;     cin >> h >> v;     bool flag = true;     if (h[0] ==  >  && v[0] ==  v ) flag = false;     if (h[0] ==  <  && v[m - 1] ==  v ) flag = false;     if (h[n - 1] ==  >  && v[0] ==  ^ ) flag = false;     if (h[n - 1] ==  <  && v[m - 1] ==  ^ ) flag = false;     if (flag)       puts( YES );     else       puts( NO );     return 0;   }   