#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
double a[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t;
  cin >> t;
  while (t--) {
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; i++) cin >> a[i];
    sort(a + 1, a + 1 + n);
    double ans = 0;
    for (int i = 1; i <= n; i++)
      for (int j = i; j <= n; j++) ans += a[j] / j;
    if (fabs(ans - m) < 1e-8)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
