func_code_string: #include <bits/stdc++.h>   using namespace std;   long long gcd(long long x, long long y) {     if (y == 0)       return x;     else       return gcd(y, x % y);   }   long long expo(long long n, long long m) {     long long r = 1;     while (m > 0) {       if (m % 2) r = (r * n) % 1000000009;       n = (n * n) % 1000000009;       m = m / 2;     }     return r % 1000000009;   }   long long lx = 0, ly = 0;   bool check(long long x, long long y) {}   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     ;     long long a, b;     cin >> a >> b;     string s;     cin >> s;     long long p = 0, q = 0;     if (a == 0 && b == 0) {       cout <<  Yes ;       return 0;     }     for (long long i = 0; i < s.size(); i++) {       if (s[i] ==  U ) {         ly++;       } else if (s[i] ==  D )         ly--;       else if (s[i] ==  L )         lx--;       else         lx++;       if (lx == a && ly == b) {         cout <<  Yes ;         return 0;       }     }     if (lx == 0 && ly == 0) {       cout <<  No ;       return 0;     }     for (long long i = 0; i < s.size(); i++) {       if (s[i] ==  U ) {         q++;       } else if (s[i] ==  D )         q--;       else if (s[i] ==  L )         p--;       else         p++;       long long x = a - p, y = b - q, X = lx, Y = ly;       if (lx == 0) {         if (ly > 0 && y > 0 && x == 0 && y % ly == 0) {           cout <<  Yes ;           return 0;         } else if (ly < 0 && y < 0 && x == 0) {           ly = -1 * ly, y = -1 * y;           if (y % ly == 0) {             cout <<  Yes ;             return 0;           }         }       } else if (ly == 0) {         if (lx > 0 && x > 0 && y == 0 && x % lx == 0) {           cout <<  Yes ;           return 0;         } else if (lx < 0 && x < 0 && y == 0) {           lx = -1 * lx, x = -1 * x;           if (x % lx == 0) {             cout <<  Yes ;             return 0;           }         }       } else {         if (lx > 0 && x > 0) {           if (ly > 0 && y > 0) {             if (x / lx == y / ly && x % lx == 0 && y % ly == 0) {               cout <<  Yes ;               return 0;             }           } else if (ly < 0 && y < 0) {             ly = -1 * ly, y = -1 * y;             if (x / lx == y / ly && x % lx == 0 && y % ly == 0) {               cout <<  Yes ;               return 0;             }           }         } else if (lx < 0 && x < 0) {           lx = -1 * lx, x = -1 * x;           if (ly > 0 && y > 0) {             if (x / lx == y / ly && x % lx == 0 && y % ly == 0) {               cout <<  Yes ;               return 0;             }           } else if (ly < 0 && y < 0) {             ly = -1 * ly, y = -1 * y;             if (x / lx == y / ly && x % lx == 0 && y % ly == 0) {               cout <<  Yes ;               return 0;             }           }         }       }       lx = X, ly = Y;     }     cout <<  No ;     return 0;   }   