40A.md (1477B)
1 Source: https://codeforces.com/problemset/problem/40/A 2 3 A. Find Color 4 5 time limit per test 6 7 2 seconds 8 9 memory limit per test 10 11 256 megabytes 12 13 input 14 15 stdin 16 17 output 18 19 stdout 20 21 Not so long ago as a result of combat operations the main Berland place of interest — the magic clock — was damaged. The cannon's balls made several holes in the clock, that's why the residents are concerned about the repair. The magic clock can be represented as an infinite Cartesian plane, where the origin corresponds to the clock center. The clock was painted two colors as is shown in the picture: 22 23  24 25 The picture shows only the central part of the clock. This coloring naturally extends to infinity. 26 27 The balls can be taken to be points on the plane. Your task is to find the color of the area, damaged by the given ball. 28 29 All the points located on the border of one of the areas have to be considered painted black. 30 31 Input 32 33 The first and single line contains two integers *x* and *y* — the coordinates of the hole made in the clock by the ball. Each of the numbers *x* and *y* has an absolute value that does not exceed 1000. 34 35 Output 36 37 Find the required color. 38 39 All the points between which and the origin of coordinates the distance is integral-value are painted black. 40 41 Examples 42 43 Input 44 45 ``` 46 -2 1 47 ``` 48 49 Output 50 51 ``` 52 white 53 ``` 54 55 Input 56 57 ``` 58 2 1 59 ``` 60 61 Output 62 63 ``` 64 black 65 ``` 66 67 Input 68 69 ``` 70 4 3 71 ``` 72 73 Output 74 75 ``` 76 black 77 ```