#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    for (long long i = 0; i < n; i++) {
      long long x;
      cin >> x;
      m -= x;
    }
    cout << (m == 0 ? "YES\n" : "NO\n");
  }
}
