#include <iostream>
#include <vector>
#include <string>
using namespace std;
int t, a, m;
vector<string> v;
void test()
{
cin >> n >> m;
while(n--)
{
cin >> a;
s += a;
}
if(s == m)
v.push_back("YES");
else
v.push_back("NO")
}
void result()
{
for (int i = 0; i < v.size(); i++)
cout << v[i] << '\n';
}
int main()
{
cin >> t;
while(t--)
{
test();
}
result();
return 0;
}