You’re given two integers NN and MM. Find if there exists a number which is multiple of one and divisor of the other.
You’re given two integers NN and MM. Find if there exists a number which is multiple of one and divisor of the other.
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--){ int n,m; cin>>n>>m; if(m%n==0){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } } return 0; }