#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 42;
struct binarytree {
  long long value;
  vector<long long> connected_nodes;
};
void sol() {
  int n, m;
  cin >> n >> m;
  int ans = 0;
  for (long long i = 0; i < n; i++) {
    int t;
    cin >> t;
    ans += t;
  }
  if (ans == m) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a = 1;
  cin >> a;
  while (a--) {
    sol();
  }
}
