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