#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m, ret = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    m -= x;
  }
  if (m == 0)
    cout << "YES";
  else
    cout << "NO";
  cout << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int T;
  cin >> T;
  while (T--) solve();
}
