You are give set of closed (closed = contain boundary)
spheres in 3-dimentional euclidian space.
You should check if they have common point.
Input. The fist line contains number of spheres N, 1 < N ≤ 20, and then N lines go,
each with four integer numbers XiYiZi and Ri. All numbers less than 10000
in their absolute value.
Output. YES or NO.
Input#1
2
0 0 0 1
0 0 2 1
Output#1
YES
Input#2
2
0 0 0 1
2 2 2 2
Output#2
NO
Input#3
4
0 0 0 3
0 0 4 3
0 5 0 4
0 6 0 5
Output#3
YES
Input#4
4
0 0 0 3
0 0 4 3
0 5 0 4
0 6 0 4
Output#4
NO
Author:
Artem Voroztsov, played at regional student personal contest in Moscow, 29 April 2005.
1 May 2005