Not able to pass test case

#include
using namespace std;
int main() {
int n,m,q,k;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
int count=0;
cin>>q;
while(q>0){
cin>>m>>k;
count=0;
for(int i=0;i<n;i++){
if(m==arr[i]){
count++;
}else if(m>arr[i]){
if(m%arr[i]==0){
count++;
}
}
}
if(count==k)
cout<<“Yes”<<endl;
else
cout<<“No”<<endl;
q–;
}

return 0;

}

hi @umnah1103_2205d5eee7973385
Refer this -->

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.