Nezzar has a binary string s of length n that he wants to share with his best friend, Nanako. Nanako will spend q days inspecting the binary string. At the same time, Nezzar wants to change the string s into string f during these q days, because it looks better.
It is known that Nanako loves consistency so much. On the i-th day, Nanako will inspect a segment of string s from position li to position ri inclusive. If the segment contains both characters ‘0’ and ‘1’, Nanako becomes unhappy and throws away the string.
After this inspection, at the i-th night, Nezzar can secretly change strictly less than half of the characters in the segment from li to ri inclusive, otherwise the change will be too obvious.
Now Nezzar wonders, if it is possible to avoid Nanako being unhappy and at the same time have the string become equal to the string f at the end of these q days and nights.
Input
The first line contains a single integer t (1≤t≤2⋅105) — the number of test cases.
The first line of each test case contains two integers n ,q (1≤n≤2⋅105, 0≤q≤2⋅105).
The second line of each test case contains a binary string s of length n.
The third line of each test case contains a binary string f of length n.
Then q lines follow, i-th of them contains two integers li, ri (1≤li≤ri≤n) — bounds of the segment, that Nanako will inspect on the i-th day.
It is guaranteed that the sum of n for all test cases doesn’t exceed 2⋅105, and the sum of q for all test cases doesn’t exceed 2⋅105.
Output
For each test case, print “YES” on the single line if it is possible to avoid Nanako being unhappy and have the string f at the end of q days and nights. Otherwise, print “NO”.
You can print each letter in any case (upper or lower).
In the first test case, 00000→00011→00111 is one of the possible sequences of string changes.
In the second test case, it can be shown that it is impossible to have the string f at the end.
Translation
给出两个二进制字符串 s 和 f,有 q 次操作,目标是将 s 变为 f。每次操作给一个区间 [li,ri],若此时 sli∼sri 中 0 和 1 都存在,就定义为失败;否则可以修改严格小于区间一半长度数量的字符,最后若能达到目标就成功。