{"raw_statement":[{"iden":"problem statement","content":"A robot is put at the origin in a two-dimensional plane. Initially, the robot is facing in the positive $x$\\-axis direction.\nThis robot will be given an instruction sequence $s$. $s$ consists of the following two kinds of letters, and will be executed in order from front to back.\n\n*   `F` : Move in the current direction by distance $1$.\n*   `T` : Turn $90$ degrees, either clockwise or counterclockwise.\n\nThe objective of the robot is to be at coordinates $(x, y)$ after all the instructions are executed. Determine whether this objective is achievable."},{"iden":"constraints","content":"*   $s$ consists of `F` and `T`.\n*   $1 \\leq |s| \\leq 8$ $000$\n*   $x$ and $y$ are integers.\n*   $|x|, |y| \\leq |s|$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$s$\n$x$ $y$"},{"iden":"sample input 1","content":"FTFFTFFF\n4 2"},{"iden":"sample output 1","content":"Yes\n\nThe objective can be achieved by, for example, turning counterclockwise in the first `T` and turning clockwise in the second `T`."},{"iden":"sample input 2","content":"FTFFTFFF\n-2 -2"},{"iden":"sample output 2","content":"Yes\n\nThe objective can be achieved by, for example, turning clockwise in the first `T` and turning clockwise in the second `T`."},{"iden":"sample input 3","content":"FF\n1 0"},{"iden":"sample output 3","content":"No"},{"iden":"sample input 4","content":"TF\n1 0"},{"iden":"sample output 4","content":"No"},{"iden":"sample input 5","content":"FFTTFF\n0 0"},{"iden":"sample output 5","content":"Yes\n\nThe objective can be achieved by, for example, turning counterclockwise in the first `T` and turning counterclockwise in the second `T`."},{"iden":"sample input 6","content":"TTTT\n1 0"},{"iden":"sample output 6","content":"No"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}