• + 0 comments

    i think this will help....

    include

    include

    using namespace std;

    int main(){ int x1; int v1; int x2; int v2; cin >> x1 >> v1 >> x2 >> v2; if((x1>x2&&v1v2)){ double remainder; remainder = abs(x1-x2)%abs(v2-v1); if (remainder==0.0){ cout<<"YES"; return 0; }

    }
    cout<<"NO";   
    return 0;
    

    }