#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> a(n + 2, 0);
    for (int i = 1; i <= n; i++) cin >> a[i];
    sort(&a[1], &a[n + 1]);
    int S = 0;
    for (int i = n; i >= 1; i--) {
      S = S + a[i];
    }
    if (S == k)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
