[TASK]:
You will be given lines of pseudocode, your task is to write the corresponding C++ code. The pseudocode will provide detailed description of the c++ code line by line. The pseudocode is garanteed to be correct and complete.

[INSTRUCTION]:
The following libraries are already included in the code.
```cpp
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <fstream>
#include <climits>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <bitset>
using namespace std;
```
Do not include them in your code again. Please surround your code with ```cpp and ``` markers. Note that the code should correspond to the pseudocode line by line.

[PSEUDOCODE]:
define the main function
    x, y = integers
    read x, y
    a = string
    read a
    len = integer with len = a.length()
    rx, ry = integer with rx = 0, ry = 0
    for i = 0 to len exclusive
        if a[i] is U, ry = ry + 1
        if a[i] is D, ry = ry - 1
        if a[i] is R, rx = rx + 1
        if a[i] is L, rx = rx - 1
    end of the block
    tx, ty, nx, ny = integers with tx = 0, ty = 0, nx = 0, ny = 0
    for i = 0 to len exclusive
        if rx and ry
            tx = (x - nx) modulo rx
            ty = (y - ny) modulo ry
            if not tx and not ty and (x - nx) / rx is (y - ny) / ry and (x - nx) / rx >= 0
                print Yes
                return to indicate successful execution
            end of the block
        else if rx and not ry
            tx = (x - nx) modulo rx
            if not tx and (x - nx) / rx >= 0 and ny is y
                print Yes
                return to indicate successful execution
            end of the block
        else if not rx and ry
            ty = (y - ny) modulo ry;
            if not ty and (y - ny) / ry >= 0 and nx == x)
                print Yes
                return to indicate successful execution
            end of the block
        else
            if nx is x and ny is y
                print Yes
                return to indicate successful execution
            end of the block
        end of the block
        if a[i] is U, ny = ny + 1
        if a[i] is D, ny = ny - 1
        if a[i] is R, nx = nx + 1
        if a[i] is L, nx = nx - 1
    end of the block
    print No
    return to indicate successful execution
end of the block

[CODE]:

int main() {
    int x, y;
    cin >> x >> y;
    string a;
    cin >> a;
    int len = a.length();
    int rx = 0, ry = 0;
    for (int i = 0; i < len; i++) {
        if (a[i] == 'U') ry += 1;
        if (a[i] == 'D') ry -= 1;
        if (a[i] == 'R') rx += 1;
        if (a[i] == 'L') rx -= 1;
    }
    int tx = 0, ty = 0, nx = 0, ny = 0;
    for (int i = 0; i < len; i++) {
        if (rx && ry) {
            tx = (x - nx) % rx;
            ty = (y - ny) % ry;
            if (!tx && !ty && (x - nx) / rx == (y - ny) / ry && (x - nx) / rx >= 0) {
                cout << "Yes" << endl;
                return 0;
            }
        } else if (rx && !ry) {
            tx = (x - nx) % rx;
            if (!tx && (x - nx) / rx >= 0 && ny == y) {
                cout << "Yes" << endl;
                return 0;
            }
        } else if (!rx && ry) {
            ty = (y - ny) % ry;
            if (!ty && (y - ny) / ry >= 0 && nx == x) {
                cout << "Yes" << endl;
                return 0;
            }
        } else {
            if (nx == x && ny == y) {
                cout << "Yes" << endl;
                return 0;
            }
        }
        if (a[i] == 'U') ny += 1;
        if (a[i] == 'D') ny -= 1;
        if (a[i] == 'R') nx += 1;
        if (a[i] == 'L') nx -= 1;
    }
    cout << "No" << endl;
    return 0;
}