#include int mod(int n,int b){ return (n%b<0)?(b+n%b):(n%b); } using namespace std; int main(){ int b0,c0,b1,c1; cin>>b0>>c0>>b1>>c1; for(int i=0;i