[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
    let a, b long longs
    let in a string
    read a, b, and in
    let x, y long longs both with value 0
    let len a long long with value length of in
    let zx, zy long longs both with value 0
    for long long i = 0 to len exclusive
        if zx is a and zy is b
            print Yes
            return to indicate successful execution
        end of the block
        if in[i] is U, increment zy
        if in[i] is D, decrement zy
        if in[i] is L, decrement zx
        if in[i] is R, increment zx
    end of the block
    if zx and zy are 0
        print No
        return to indicate successful execution
    end of the block
    for i = 0 to len exclusive
        if in[i] is U, increment y
        if in[i] is D, decrement y
        if in[i] is L, decrement x
        if in[i] is R, increment x
        let chax, chay long longs with chax = a - x and chay = b - y
        if zx is 0
            if chay mod zy is 0 and zx is chax
                if chay / zy is at least 0
                    print Yes
                    return to indicate successful execution
                end of the block
            end of the block
        otherwise, if zy is 0
            if chax mod zx is 0 and zy equals chay
                if chax / zx is at least 0
                    print Yes
                    return to indicate successful execution
                end of the block
            end of the block
        otherwise if chax mod zx is 0 and chay mod zy is 0
            if chax / zx = chay / zy and chax / zx is at least 0 and chay / zy is at least 0
                print Yes
                return to indicate successful execution
            end of the block
        end of the block
    end of the block
    print No
    return to indicate successful execution
end of the block

[CODE]:

int main() {
    long long a, b;
    string in;
    cin >> a >> b >> in;
    long long x = 0, y = 0;
    long long len = in.length();
    long long zx = 0, zy = 0;
    for (long long i = 0; i < len; i++) {
        if (zx == a && zy == b) {
            cout << "Yes" << endl;
            return 0;
        }
        if (in[i] == 'U') { zy++; }
        if (in[i] == 'D') { zy--; }
        if (in[i] == 'L') { zx--; }
        if (in[i] == 'R') { zx++; }
    }
    if (zx == 0 && zy == 0) {
        cout << "No" << endl;
        return 0;
    }
    for (int i = 0; i < len; i++) {
        if (in[i] == 'U') { y++; }
        if (in[i] == 'D') { y--; }
        if (in[i] == 'L') { x--; }
        if (in[i] == 'R') { x++; }
        long long chax = a - x, chay = b - y;
        if (zx == 0) {
            if (chay % zy == 0 && zx == chax) {
                if (chay / zy >= 0) {
                    cout << "Yes" << endl;
                    return 0;
                }
            }
        } else if (zy == 0) {
            if (chax % zx == 0 && zy == chay) {
                if (chax / zx >= 0) {
                    cout << "Yes" << endl;
                    return 0;
                }
            }
        } else if (chax % zx == 0 && chay % zy == 0) {
            if (chax / zx == chay / zy && chax / zx >= 0 && chay / zy >= 0) {
                cout << "Yes" << endl;
                return 0;
            }
        }
    }
    cout << "No" << endl;
    return 0;
}