program route;
var
 x,y:real; 
 i,c:integer;
 ch1,ch2,ch3:char;
 s:string[255];
 b:boolean;
begin
 x:=0;
 y:=0;
 b:=false;
  read(ch1);
  s:=ch1;
  if ch1<>"E" then 
  begin

   repeat
    read(ch1);
    val(ch1,i,c);
    if c=0 then s:=s+ch1;
   until c<>0;
   val(s,i,c);
  end
  else i:=0;
repeat
  read(ch2);
  
  if ch2<>',' then if ch2<>'.' then b:=true;
  if b then
  begin
   read(ch3);
   if ch1='N' then if ch2='E' then
    begin
     x:=x+sqrt(sqr(i)*2);
     y:=y+sqrt(sqr(i)*2);
    end
   else
    begin
     x:=x-sqrt(sqr(i)*2);
     y:=y+sqrt(sqr(i)*2);
    end
   else
   if ch2='E' then
    begin
     x:=x+sqrt(sqr(i)*2);
     y:=y-sqrt(sqr(i)*2);
    end
    else
    begin
     x:=x-sqrt(sqr(i)*2);
     y:=y-sqrt(sqr(i)*2);
    end;
  end
  else
   begin 
    if ch1='N' then y:=y+i;
    if ch1='E' then x:=x+i;
    if ch1='S' then y:=y-i;
    if ch1='W' then x:=x-i;
   end;

  read(ch1);
  s:=ch1;
  if ch1<>"E" then 
  begin
   repeat
    read(ch1);
    val(ch1,i,c);
    if c=0 then s:=s+ch1;
   until c<>0;
   val(s,i,c);
  end
  else i:=0;
 until i=0;
 writeln('You can go to (',x:1:3,',',y:1:3,'), the distance is ',sqrt(sqr(x)+sqr(y)):1:3,' steps.'); 
end.