#include <bits/stdc++.h>
using namespace std;
int main() {
  int test;
  cin >> test;
  while (test--) {
    int num;
    float final_num;
    cin >> num >> final_num;
    float arr[num], sum = 0, cnt = 0;
    for (int i = 0; i < num; i++) {
      cin >> arr[i];
      sum += arr[i];
    }
    if (sum == final_num) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
