#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using i32 = int_fast32_t;
using i64 = int_fast64_t;
using usize = uint_fast64_t;
using P = pair<i64, i64>;
void solve() {
  i64 a, b;
  cin >> a >> b;
  i64 s = 0;
  for (i64 i = 0; i < (i64)(a); ++i) {
    i64 A;
    cin >> A;
    s += A;
  }
  cout << (s == b ? "YES" : "NO") << endl;
}
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  i64 n;
  cin >> n;
  for (i64 i = 0; i < (i64)(n); ++i) solve();
}
