#include <bits/stdc++.h>
using namespace std;
// Compile with "(g++) -std=c++11 -Wall -Wextra -Wconversion -Wshadow -Dcychien"
#ifdef cychien
#define debug(...) do {\
	fprintf(stderr, "%s - %d : (%s) = ", __PRETTY_FUNCTION__, __LINE__, #__VA_ARGS__);\
    _DO(__VA_ARGS__);\
}while(0) 
template<typename I> void _DO(I&&x) {cerr << x << '\n';}
template<typename I, typename ...T> void _DO(I&&x,T&&...tail) {cerr << x << ", "; _DO(tail...);}
#define IOS
#else
#define debug(...)
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#endif
#define FOR(i, n) for(int i = 0; i < n; i++)
#define FOR1(i, n) for(int i = 1; i <= n; i++)
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define SZ(x) (ll)x.size()
#define ALL(x) (x).begin(),(x).end()
#define SORT(x) sort(ALL(x))
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
const int NF = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3f;
const ll MOD = 1e9 + 7;
const ld PI = 3.14159265358979323846264338327950288;

int main() {
    IOS;
    int t;
    cin >> t;
    while (t--){
    	int n;
    	cin >> n;
    	string a;
    	cin >> a;
    	cin >> a;
    	cin >> a;
    	FOR (i, n) cout << 0;
    	FOR (i, n) cout << 1;
    	cout << "0\n";
	}
    return 0;
}
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
int main(int argc, char const *argv[]) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll t, n, k;
    cin >> n;
    vector <ll> a, b;
    for (ll i = 1; i <= n; i++) {
      cin >> k;
      a.push_back(k);
    }
    for (ll i = 1; i <= n; i++) {
      cin >> k;
      b.push_back(k);
    }
    ll ans = 0;
    for (ll i = 0; i < n; i++) {
      ans += a[i] * b[i];
    }
  cout << (ans == 0 ? "Yes" : "No") << endl;
  return 0;
}
