Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(){
- int a, b, r, a1, b1, r1;
- double temp;
- freopen("input.txt","r",stdin);
- freopen("output.txt","w",stdout);
- scanf("%d%d%d%d%d%d", &a, &b, &r, &a1, &b1, &r1);
- temp=sqrt(pow((double)(a-a1), 2.) + pow((double)(b-b1), 2.));
- if(temp>(double)(r+r1) || temp+(double)r<r1 || temp+(double)r1<r)
- printf("NO");
- else
- printf("YES");
- return 0;
- }
Add Comment
Please, Sign In to add comment