coroana te rog!
#include<iostream>
#include<fstream>
#include<cmath>
using namespace std;
int main(){
int x,y,a,b,nr=0,max=-1;
ifstream f("puncte.txt");
f>>a>>b;
while(f>>x>>y){
if(x>0&&y>0)
nr++;
if(sqrt((x-a)*(x-a)+(y-b)*(y-b))>max)
max=sqrt((x-a)*(x-a)+(y-b)*(y-b));
a=x;
b=y;
}
f.close();
cout<<nr<<' '<<max;
return 0;
}