Guest User

Untitled

a guest
Dec 10th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main(){
  4.   int a, b, r, a1, b1, r1;
  5.   double temp;
  6.   freopen("input.txt","r",stdin);
  7.   freopen("output.txt","w",stdout);
  8.   scanf("%d%d%d%d%d%d", &a, &b, &r, &a1, &b1, &r1);
  9.   temp=sqrt(pow((double)(a-a1), 2.) + pow((double)(b-b1), 2.));
  10.   if(temp>(double)(r+r1) || temp+(double)r<r1 || temp+(double)r1<r)
  11.         printf("NO");
  12.   else
  13.       printf("YES");
  14.  
  15.   return 0;
  16. }
Add Comment
Please, Sign In to add comment