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