#include
struct node{
double dis(node);
node add(node);
double mul(node);
node mul(double);
double abs();
node unt();
node neg();
double agl(node);
bool eql(node);
int pal(node);
double x,y;
};
double node::dis(node a){
return sqrt(pow(x-a.x,2)+pow(y-a.y,2));
}
node node::add(node a){
return {x+a.x,y+a.y};
}
double node::mul(node a){
return x*a.x+y*a.y;
}
node node::mul(double a){
return {x*a,y*a};
}
node node::neg(){
return {-x,-y};
}
double node::abs(){
return sqrt(x*x+y*y);
}
node node::unt(){
double d=this->abs();
return {x/d,y/d};
}
double node::agl(node a){
return acos((x*a.x+y*a.y)/(this->abs()*a.abs()));
}
bool node::eql(node a){
if(fabs(x-a.x)<1e-6&&fabs(y-a.y)<1e-6)return 1;
return 0;
}
int node::pal(node a){
node u1=this->unt();
node u2=a.unt();
if(u1.eql(u2))return 1;
if(u1.eql(u2.neg()))return -1;
return 0;
}