#C11271. Point in Circle
Point in Circle
Point in Circle
You are given the coordinates of the center of a circle ( (X_c, Y_c) ) along with its radius ( R ), as well as the coordinates of a point ( (X_p, Y_p) ). Your task is to determine whether the point lies inside the circle, on its boundary, or outside the circle.
Recall that a point is:
- ( \textbf{inside} ) the circle if ( (X_p - X_c)^2 + (Y_p - Y_c)^2 < R^2 ),
- ( \textbf{on the boundary} ) if ( (X_p - X_c)^2 + (Y_p - Y_c)^2 = R^2 ), and
- ( \textbf{outside} ) if ( (X_p - X_c)^2 + (Y_p - Y_c)^2 > R^2 ).
inputFormat
The input is provided via standard input (stdin) as a single line containing five integers separated by spaces: ( X_c ), ( Y_c ), ( R ), ( X_p ), and ( Y_p ).
outputFormat
Print a single string to standard output (stdout) which is either "inside", "on the boundary", or "outside" depending on the position of the point relative to the circle.## sample
0 0 5 2 2
inside