/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static class Point { private double x, y;
public Point(double x,
double y
){ this.x = x;
this.y = y;
}
public double getX(){
return this.x;
}
public double getY(){
return this.y;
}
return (d.getX() - a.getX()) * (b.getY() - a.getY()) - (d.getY() - a.getY()) * (b.getX() - a.getX());
}
return dotLine(a, b, c) * dotLine(a, b, d) >= 0;
}
}
{
Scanner in
= new Scanner
(System.
in); Point d
= new Point(in.
nextDouble(), in.
nextDouble()); if(d.getX()<0){
if(Point.
dotDot(a,b,c,d
) && Point.
dotDot(b,c,a,d
) && Point.
dotDot(c,a,b,d
)){ System.
out.
println("Точка D принадлежит заштрихованной части плоскости."); } else {
System.
out.
println("Точка D не принадлежит заштрихованной части плоскости."); }
} else {
if (Math.
sqrt(Math.
pow(d.
getX(),
2) + Math.
pow(d.
getY(),
2))<=1) { System.
out.
println("Точка D принадлежит заштрихованной части плоскости."); }
else {
System.
out.
println("Точка D не принадлежит заштрихованной части плоскости."); }
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgY2xhc3MgUG9pbnQgewoJCXByaXZhdGUgZG91YmxlIHgsIHk7CgkJcHVibGljIFBvaW50KGRvdWJsZSB4LCBkb3VibGUgeSl7CgkJCXRoaXMueCA9IHg7CgkJCXRoaXMueSA9IHk7CgkJfQoJCXB1YmxpYyBkb3VibGUgZ2V0WCgpewoJCQlyZXR1cm4gdGhpcy54OwoJCX0KCQlwdW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