#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N,M; cin>>N>>M; if(N%M!=0) { cout<<"-1"<