Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/boolean-doira-ichidami

Inside the circle?

Easy 1000 ms 64 MB 19%
Share

A circle with centre $(a; b)$ and radius $r$ and a point $(x; y)$ are given on the plane. Check whether the statement is true: “the point belongs to the circle”, that is, it lies inside the circle or on its boundary:

$$(x - a)^{2} + (y - b)^{2} \le r^{2}$$

A circle centred at the point a, b and a point

Input

The first line contains three integers: $a$, $b$ and $r$.
The second line contains two integers: $x$ and $y$.

Output

One integer: $1$ if the statement is true, otherwise $0$.

Note

$-1000 \le a, b, x, y \le 1000$
$1 \le r \le 1000$

Examples

Input #1
0 0 5
3 4
Output #1
1
Input #2
0 0 5
4 4
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.