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