#include using namespace std; int x,y; int main(){ cin>>x>>y; if(y%x==0)cout<