#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
long long int fexp(long long int a, long long int b) {
  long long int ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % 1000000007;
    b /= 2;
    a = a * a % 1000000007;
  }
  return ans;
}
long long int inverse(long long int a, long long int p) {
  return fexp(a, p - 2);
}
void ingraph(vector<vector<long long int> > &graph, long long int m) {
  long long int x, y;
  for (long long int i = 0; i < m; i++) {
    cin >> x >> y;
    x--, y--;
    graph[x].push_back(y);
    graph[y].push_back(x);
  }
}
void in(vector<vector<long long int> > &g, long long int m) {
  for (long long int i = 0; i < m; i++) {
    string str;
    cin >> str;
    for (int j = 0; j < str.length(); j++) {
      long long int nu = m + str[j] - 'a';
      g[i].push_back(nu);
      g[nu].push_back(i);
    }
  }
}
long long int modify(long long int n) {
  long long int res = n;
  res %= 1000000007;
  res += 1000000007;
  res %= 1000000007;
  return res;
}
long long int min(long long int a, long long int b) {
  if (a > b) return b;
  return a;
}
bool isPrime(int x) {
  if (x == 1) return false;
  for (int i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
vector<vector<long long int> > grap(27);
vector<long long int> num(27, 0);
bool found = false;
void dfs(long long int node, int c) {
  if (num[node] == 1) return;
  num[node] = 1;
  if (node == c) {
    found = true;
    return;
  }
  for (auto i : grap[node]) {
    dfs(i, c);
  }
}
void dfs_new(vector<long long int> &used, int i,
             vector<vector<long long int> > &g) {
  if (used[i]) return;
  used[i] = 1;
  for (auto k : g[i]) {
    if (!used[k]) {
      dfs_new(used, k, g);
    }
  }
}
vector<int> par(200202, 0);
long long int find(long long int x) {
  if (par[x]) return par[x] = find(par[x]);
  return x;
}
void merge(long long int x, long long int y) {
  y = find(y);
  x = find(x);
  if (x == y) return;
  par[y] = x;
}
void solve() {
  long long int n, k;
  cin >> n >> k;
  vector<long long int> v(n);
  long long int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    sum += v[i];
  }
  if (sum == k) {
    cout << "YES" << endl;
    ;
    return;
  }
  cout << "NO" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int n = 1;
  cin >> n;
  while (n--) {
    solve();
  }
  return 0;
}
