#include <bits/stdc++.h>
const long long M = 1e9 + 7;
using namespace std;
long long power(long long x, long long y) {
  if (y == 0) return 1;
  long long t = power(x, y / 2);
  if (y % 2 == 1) return (x * t * t) % 10000000000007;
  return (t * t) % 10000000000007;
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
void solve() {
  long long n, k;
  cin >> n >> k;
  long long a[n];
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum == k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) solve();
}
