시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB96675.000%

문제

After breaking into the database of the TU Delft and releasing sensitive information to the public, Anton the cyber criminal got the CIA looking for him. After being arrested, Anton was transported to the heavily guarded prison Alcatraz. Disabling the security system was a piece of cake, so he could easily get outside of the prison walls. However, behind these walls a number of guards are positioned and they will immediately sound the alarm if they spot any escaped prisoner.

To escape, Anton needs to cross a field with width $w$ and height $h$ that is being guarded by $n$ guards, without being spotted by any of the guards. He starts at position $(0,0)$ and can only escape if he reaches position $(w,h)$ without being spotted. Even if the criminal is only spotted at position $(n,n)$ the guards will sound the alarm and he will be captured. Some guards have better views that others, so every guard $i$ has an associated range of view $r_i$. If the distance between the guard and the escaped prisoner is $r_i$ or less, the guard will sound the alarm and the prisoner will return to his cell.

Your job is now to find out whether Anton can escape Alcatraz or if he cannot escape without being spotted. If he can escape, output ESCAPE. Otherwise output NO ESCAPE.

입력

  • A line with 3 integers:
    • $w$: the width of the area $(1 \leq w \leq 100)$.
    • $h$: the height of the area $(1 \leq h \leq 100)$.
    • $g$: the number of guards $(0 \leq g \leq 100)$.
  • $n$ lines $(i=1\dots n)$ with 3 integers each:
    • $x_i$: the $x$-coordinate of the $i^{th}$ guard $(0 \leq x_i \leq w)$.
    • $y_i$: the $y$-coordinate of the $i^{th}$ guard $(0 \leq y_i \leq h)$.
    • $r_i$: the range of the $i^{th}$ guard's vision $(0 \leq r_i \leq 100)$.

출력

ESCAPE if the prisoner can escape Alcatraz, NO ESCAPE otherwise.

예제 입력 1

5 5 3
3 1 2
3 5 1
1 4 1

예제 출력 1

ESCAPE

예제 입력 2

5 5 3
3 1 2
3 4 1
1 4 1

예제 출력 2

NO ESCAPE