#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test;
  cin >> test;
  while (test--) {
    long long cas, sum = 0, tar, tcs;
    cin >> cas >> tar;
    for (int i = 0; i < cas; i++) {
      cin >> tcs;
      sum += tcs;
    }
    if (sum == tar) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
