#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  long long a[n + 3];
  long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum == m) {
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
}
signed main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
    cout << "\n";
  }
}
