#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  int temp, sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    sum += temp;
  }
  if (sum == m) {
    cout << "YES"
         << "\n";
  } else
    cout << "NO"
         << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
