favorite We need a little bit of your help to keep things running, click on this banner to learn more

Two circles

Two circles

How many points in common two given circles have? prb4


Six real numbers x1, y1, r1, x2, y2, r2, where x1, y1, x2, y2 are the coordinates of the centers of the circles, r1, r2 are its radius.


The number of common points for two circles: 0, 1 or 2. Print -1 if circles have a lot of common points.

Time limit 1 second
Memory limit 128 MiB
Input example #1
0 0 5 5 0 1
Output example #1