#include <bits/stdc++.h>
using namespace std;
void getZarr(string str, vector<long long int> &Z) {
  long long int n = str.length();
  long long int L, R, k;
  L = R = 0;
  for (long long int i = 1; i < n; ++i) {
    if (i > R) {
      L = R = i;
      while (R < n && str[R - L] == str[R]) R++;
      Z[i] = R - L;
      R--;
    } else {
      k = i - L;
      if (Z[k] < R - i + 1)
        Z[i] = Z[k];
      else {
        L = i;
        while (R < n && str[R - L] == str[R]) R++;
        Z[i] = R - L;
        R--;
      }
    }
  }
}
vector<long long int> isprime;
void seive(long long int size) {
  isprime.resize(size + 1, 1);
  long long int i, j;
  isprime[0] = 0;
  isprime[1] = 0;
  for (i = 2; i * i <= size; i++) {
    if (isprime[i]) {
      for (j = 2; j * i <= size; j++) isprime[i * j] = 0;
    }
  }
}
long long int power(long long int x, unsigned long long int y,
                    long long int m) {
  if (y == 0) return 1;
  long long int p = power(x, y / 2, m);
  p = (p * p) % m;
  if (y % 2 != 0) p = (p * x) % m;
  return p;
}
long long int modinverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
long long int findans() {
  long long int n, m, i, j;
  cin >> n >> m;
  vector<long long int> v(n);
  float sum1 = 0, sum2 = 0;
  for (i = 0; i < n; i++) cin >> v[i];
  long long int ss = 0;
  for (i = 0; i < n; i++) ss += v[i];
  if (ss == m)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t, i;
  cin >> t;
  for (i = 0; i < t; i++) {
    findans();
  }
  return 0;
}
