#include <bits/stdc++.h>
using namespace std;
long double pi = 3.14159265359;
long long n[105];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  long long a, b;
  cin >> t;
  while (t--) {
    cin >> a >> b;
    long long second = 0;
    for (int i = 1; i <= a; i++) {
      cin >> n[i];
      second += n[i];
    }
    if (second == b) {
      cout << "YES";
    } else {
      cout << "NO";
    }
    cout << endl;
  }
}
