#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t, n, m, i, j;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    for (i = 0; i < n; i++) {
      cin >> j;
      m -= j;
    }
    if (m)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
