#include <bits/stdc++.h>
using namespace std;
const int N = 150;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tc;
  cin >> tc;
  while (tc--) {
    int n, m, a[N], res = 0;
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      res += a[i];
    }
    if (res == m) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
