Under construction

Still being built. Things may change

Donghyeok Pizza

Interview

Time limit1sMemory limit128 MB

Summary
Given a circular table of radius r and a rectangular pizza w by l, decide whether the rectangle fits inside the circle.
Level

Easy3 of 10

Topics
Geometry, Math, Implementation, Brute force
Solved
No attempts yet

Problem

When the Daejeon ACM-ICPC Regional ends, all of the contestants go together to Donghyeok Pizza, a restaurant near KAIST. Because the contest runs for five hours, everyone is extremely hungry. To eat as quickly as possible, they want to order one large pizza. But if the pizza is too big, it might not fit on the table. The table is a circle and the pizza is a rectangle. Given the radius of the table and the size of the pizza, write a program that determines whether the pizza can be placed on the table.

Input

The input consists of several test cases. Each test case is given as three integers rr, ww, and ll. Here rr is the radius of the table, and ww and ll are the width and length of the pizza, respectively. (1≤r≤10001 \le r \le 1000, 1≤w≤l≤10001 \le w \le l \le 1000) When a line containing r=0r = 0 is given, the program terminates.

Output

For each test case, print on its own line whether the pizza can be placed on the table. For the ii-th test case (numbered starting from 11), print Pizza i fits on the table. if the pizza fits, or Pizza i does not fit on the table. if it does not, where i is replaced by the actual test case number. A pizza whose corner touches the boundary of the table is considered to fit.

Examples1

  1. Example 1

    Input
    38 40 60
    35 20 70
    50 60 80
    0
    
    Expected output
    Pizza 1 fits on the table.
    Pizza 2 does not fit on the table.
    Pizza 3 fits on the table.