#include <iostream>
using namespace std;
 
int main() 
{
    double x1, y1, x2, y2, x3, y3, x4, y4;
    double Ua, Ub;
    cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;
    double D = (x1-x2)*(y4-y3)-(x4-x3)*(y1-y2);
    if (D == 0) cout << "...to be continue...";
    else {
	    Ua=((x4-x2)*(y4-y3)-(x4-x3)*(y4-y2)) / D;
	    Ub=((x1-x2)*(y4-y2)-(x4-x2)*(y1-y2)) / D;
	    cout << Ua << " " << Ub << endl;
	    cout << "The segments " << ( Ua<=1 && Ua>=0 && Ub<=1 && Ub>=0 ? "" : "do not") << "intersect";
    }
    return 0;
}