#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void init() {}
void solve() {
  int n;
  cin >> n;
  ll m;
  cin >> m;
  for (int i = (1); i <= (n); ++i) {
    ll x;
    cin >> x;
    m -= x;
  }
  if (m == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int _t_t_;
  cin >> _t_t_;
  init();
  while (_t_t_--) {
    solve();
  }
  return 0;
}
