#K68742. Enemy Alert

    ID: 32932 Type: Default 1000ms 256MiB

Enemy Alert

Enemy Alert

You are given a circle centered at the origin \((0,0)\) with a radius \(R\) and the positions of enemy soldiers on a 2D plane. A soldier at position \((x, y)\) is considered to be inside the alerting zone if \(x^2 + y^2 \le R^2\). Your task is to determine whether at least one soldier is located inside or exactly on the boundary of this circle.

If any soldier satisfies the condition \(x^2 + y^2 \le R^2\), print Alert; otherwise, print Safe.

Note: Use the standard input (stdin) and standard output (stdout) for reading the inputs and printing the result.

inputFormat

The input is read from stdin and is structured as follows:

  • The first line contains a single integer \(R\), the radius of the alerting zone.
  • The second line contains a single integer \(n\), the number of enemy soldiers.
  • The next \(n\) lines each contain two space-separated integers \(x\) and \(y\), representing the coordinates of an enemy soldier.

outputFormat

Output a single line to stdout containing either Alert if any soldier is within or on the boundary of the circle, or Safe if none are.

## sample
5
3
4 3
6 7
1 1
Alert