#include <bits/stdc++.h>
using namespace std;
void solving() {
  int n, m;
  cin >> n >> m;
  int a[n];
  int sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (sum == m) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
int main() {
  int test;
  cin >> test;
  while (test--) solving();
  return 0;
}
