#include <bits/stdc++.h>
using namespace std;
int t, n, k;
vector<double> v;
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> t;
  while (t--) {
    cin >> n >> k;
    v.resize(n);
    for (auto &i : v) cin >> i;
    if (accumulate((v).begin(), (v).end(), 0) == k)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
