#include <bits/stdc++.h>
using namespace std;
int f() {
  int n, m;
  cin >> n >> m;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    sum += k;
  }
  if (sum == m)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 1;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    f();
  }
  return 0;
}
