#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
const long long M = 1e9 + 7;
const long long H = 1e5 + 7;
const long long B = 1e4 + 7;
const long long A = 1e6 + 7;
set<long long> o;
map<long long, long long> mp, pm;
map<char, long long> hs;
vector<long long> v, vc, oreder1, inoreder, posoreder, ve, vv, vd;
deque<char> p, pe;
deque<string> ts, ss, stoi, rs;
deque<double> sd, ds;
string g, s, w, h, s1;
double l;
char z, u = 'a';
bool re, rt;
deque<int> e;
map<pair<long long, long long>, long long> aw, wa;
long long cnt, ans, TT, n, a, b, c, q, m, t, d, temp, mx = 0, mn = 0, rem, sum,
                                                      tt = 1e32;
long long used[N];
int main() {
  ios_base::sync_with_stdio(0);
  srand(time(NULL));
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a >> b;
    cnt = 0;
    for (long long i = 0; i < a; i++) {
      cin >> l;
      cnt += l;
    }
    if (cnt == b) cout << "YES" << endl;
    if (cnt != b) cout << "NO" << endl;
  }
}
