A=input('dwse tis syntetagmenes [x,y] tou A shmeiou:');
B=input('dwse tis syntetagmenes [x,y] tou B shmeiou:');

sA=size(A);
sB=size(B);

if sA(1)~=1||sA(2)~=2||sB(1)~=1||sB(2)~=2 % any(sA~=[1,2])||any(sB~=[1,2])
    disp('input error! Please reun the program')
else
    d=sqrt((A(1)-B(1))^2+(A(2)-B(2))^2);
    disp(['H apostasi metajy tou A kai tou B einai:', num2str(d)])
end

