#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test_case, n, k;
  cin >> test_case;
  while (test_case--) {
    float sum = 0;
    cin >> n >> k;
    vector<int> v;
    for (int i = 0; i < n; i++) {
      long long x;
      cin >> x;
      v.push_back(x);
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < n; i++) {
      sum += v[i];
    }
    if (sum == k) {
      cout << "YES" << '\n';
    } else
      cout << "NO" << '\n';
  }
  return 0;
}
