You are given two binary strings $S$ and $P$, each with length $N$. A binary string contains only characters '0' and '1'. For each valid $i$, let's denote the $i$-th character of $S$ by $S_i$.
You have to convert the string $S$ into $P$ using zero or more operations. In one operation, you should choose two indices $i$ and $j$ ($1 \leq i < j \leq N$) such that $S_i$ is '1' and $S_j$ is '0', and swap $S_i$ with $S_j$.
Determine if it is possible to convert $S$ into $P$ by performing some operations.

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains a single integer $N$.
- The second line contains a single string $S$.
- The third line contains a single string $P$.

-----Output-----
For each test case, print a single line containing the string "Yes" if it is possible to convert $S$ into $P$ or "No" otherwise (without quotes).

-----Constraints-----
- $1 \leq T \leq 10^5$
- $1 \leq N \leq 10^5$
- $S$ and $P$ contain only characters '0' and '1'
- the sum of $N$ over all test cases does not exceed $10^5$

-----Subtasks-----
Subtask #1 (20 points):
- $N \leq 14$
- the sum of $N$ over all test cases does not exceed $100$
Subtask #2 (30 points): the sum of $N$ over all test cases does not exceed $1,000$
Subtask #3 (50 points): original constraints

-----Example Input-----
3
2
00
00
3
101
010
4
0110
0011

-----Example Output-----
Yes
No
Yes

-----Explanation-----
Example case 1: The strings are already equal.
Example case 2: It can be showed that it is impossible to convert $S$ into $P$.
Example case 3: You can swap $S_2$ with $S_4$. The strings will then be equal.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 't = int(input())\nfor _ in range(t):\n n = int(input())\n s1 = input()\n s2 = input()\n rem = 0\n if (s1.count(\'1\') == s2.count(\'1\') and s1.count(\'0\') == s2.count(\'0\')):\n  u1 = 0\n  n1 = 0\n  s1 = list(s1)\n  s2 = list(s2)\n  for i in range(n):\n   if s1[i] != s2[i]:\n    if s1[i] == \'1\':\n     u1 += 1\n    elif s2[i] == \'1\':\n     n1 += 1\n    if u1 < n1:\n     rem = 1\n     break\n  if rem == 0:    \n   print("Yes")\n  else:\n   print("No")\n else:   print("No")\n\n\n\n\n\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 13333