#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void debug(vector<T> v) {
  cout << "\ndebug(vector)\n";
  long long i;
  for (i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << "\n\n";
}
inline bool prime(long long n) {
  long long i;
  for (i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
inline void swap(long long &a, long long &b) {
  long long temp = a;
  a = b;
  b = temp;
  return;
}
void solve() {
  long long i = 0, j = 0;
  long long n, m;
  cin >> n >> m;
  vector<long long> a(n);
  long long sum = 0;
  for (auto &x : a) {
    cin >> x;
    sum += x;
  }
  if (sum == m) {
    cout << "YES\n";
  } else
    cout << "NO\n";
}
int main(void) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    solve();
  }
}
