"Who watches the Watchmen?"
Rorschach has been looking at clues to solve the murder of his old colleague, The Comedian. He has found two strings of equal length consisting of lowercase Latin alphabets and a set of cryptic questions and instructions left by the murderer in The Comedian's house. The questions and instructions are all of the following forms:
Although Rorschach could easily solve these, he doesn't have the time. Help him solve these problems.
INPUT:
The first line of input contains two integers n - the length of the two strings and m - the number of questions left by the murderer.
The second line contains the string s1 and the third line contains the string s2, both of length n.
Then m lines follow, each representing a query:
Queries have one of the following two formats:
1 x1 x2 len: Check if substrings of length len starting from x1 in s1 and x2 in s2 are equal or not. In other words, check if s1[x1 ... (x1 + len - 1)] == s2[x2 ... (x2 + len - 1)]
2 sn i ch: Change the ith character in sn-th string to character ch
NOTE: The strings are 1-indexed.
OUTPUT:
For each query of the first type, print "YES" if the two substrings are equal and print "NO" if they aren't.
CONSTRAINTS:
1 <= n <= 100000
1 <= m <= 100000
1 <= x1, x2, len <= n
1 <= sn <= 2
1 <= i <= n
ch is a lowercase Latin alphabet
NOTE: s1[x1 ... (x1 + len - 1)] and s2[x2 ... (x2 + len - 1)] are guaranteed to be valid substrings.
Query #1: The substrings specified are s1[2..4] = "bcd" and s2[1..3] = "bcd" which are equal so answer is YES.
Query #2: Now we change the 3rd character of the s2 to 'a'
Query #3: Now the substrings are "bcd" and "bca", which are not equal so the answer is "NO"
Query #4: The specified substrings are s1[1..1] = "a" and s2[5..5] = "a" which are equal so answer is "YES"