#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long int m, a[1000], b, sum = 0;
    cin >> m >> b;
    for (int j = 0; j < m; j++) {
      cin >> a[j];
    }
    for (int j = 0; j < m; j++) {
      sum = sum + a[j];
    }
    if (sum == b) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
