#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long mcm(long long a, long long b) { return (a * b) / gcd(a, b); }
void solve() {
  int n, m;
  cin >> n >> m;
  int second = 0;
  vector<int> num(n);
  for (auto &x : num) {
    cin >> x;
    second += x;
  }
  if (second == m)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t-- > 0) solve();
  return 0;
}
