#include<iostream> using namespace std; int main() { int x,y,num=0; cin>>x>>y; int p,q; for(p=1;p<=y;p++) { for(q=1;q<=y;q++) { if(p%x==0&&q%x==0&&(p*q/x==y)) { num++; cout<<"q="<<q<<" "<<"p="<<p<<endl; } } } cout<<num; }