#include<iostream> using namespace std; int main(){ int m,n; cin>>m>>n; if(m%n==0){ cout<<1; }else{ cout<<0; } return 0; }