#include<bits/stdc++.h>
using namespace std;
int main() {
int test; int office[5];
int p;
cin >> test;
while(test --){
cin >> office[0] >> office[1] >> office[2] >> office[3] >> office[4] >> p;
int total_hours = 0;
//int work = 120;
for(int i=0; i<5;i++){
total_hours+=p*office[i];
}
if(total_hours > 120){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
}
return 0;
}
I am getting WA in may lunchtime 2020 pls help