PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#FW0000018. Gấu lại đuổi theo (Bear with me, again..)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Gấu lại đuổi theo (Bear with me, again..)

Bear with me, again..

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

The start, home and intermediate islands are circular and their interiors do not overlap. The shortest swimming distance between two islands is the distance between their centers minus the sum of their radii, not less than zero. The two swimmers may rest at an intermediate island before the next swim. A single swimming segment must not exceed K⋅MK\cdot M.

Larry and Ryan must move from the current circular island to their home island. Water gap length equals the center distance minus radii, floored at zero. Each swim may cover at most K⋅MK\cdot M units before resting on another island. Decide reachability.

Input

K,MK,M, then circles for origin and home, then nn intermediate circles.

Output

Print exactly Larry and Ryan will escape! or Larry and Ryan will be eaten to death..

Subtasks

  • Subtask 1 (40 points): n≤4n\le 4; 1≤K,M≤10001\le K,M\le 1000; 0≤n≤1000\le n\le 100; −200≤x,y≤200-200\le x,y\le 200; 0≤r≤1990\le r\le 199.
  • Subtask 2 (60 points): 1≤K,M≤10001\le K,M\le 1000; 0≤n≤1000\le n\le 100; −200≤x,y≤200-200\le x,y\le 200; 0≤r≤1990\le r\le 199.

Examples

Input

1 1
0 0 1
0 3 1
0

Output

Larry and Ryan will escape!

Explanation

The water gap is 3−1−1=13-1-1=1 mile and the allowed uninterrupted distance is KM=1K M=1, so the two can swim directly.