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