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