#include <bits/stdc++.h>
using namespace std;
int T, n, m;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &m);
    int x, sum = 0;
    for (int i = 1; i <= n; i++) scanf("%d", &x), sum += x;
    if (sum == m)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
