#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, x = 0, n;
  long long int m, s;
  cin >> t;
  while (t--) {
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> s;
      x += s;
    }
    if (x == m) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
    x = 0;
  }
  return 0;
}
