#include	<stdio.h>


static char *get_pl_field(pp)

char **pp;
{
    static char		nstr[100];
    register char	*p= *pp;
    register char	*n;

    for (n= nstr; *p != ',' && *p != ')' && *p; p++)
	*n++= *p;
    if (*p)
	p++;
    *pp= p;
    *n= '\0';
    return nstr;
}


#define	MAX_LEN	30000

main(argc, argv)

int	argc;
char	*argv;
{
  char	s[MAX_LEN];
  char	*p;
  char	*index();
  double atof();

  if (argc != 1) {
    fprintf(stderr, "Usage: %s\n", argv[0]);
    exit(1);
  }

  while (fgets(s, MAX_LEN, stdin)) {
    int		nf;
    int		i;
    float	x,y;

    p= index(s, ',') + 1;
    nf= atoi(get_pl_field(&p));

    i= 0; fwrite(&i, sizeof(int), 1, stdout);
    i= nf; fwrite(&i, sizeof(int), 1, stdout);

    for (i= 0; i < nf; i++) {
      x= atof(get_pl_field(&p));
      y= atof(get_pl_field(&p));
      fwrite(&y, sizeof(float), 1, stdout);
      fwrite(&x, sizeof(float), 1, stdout);
    }
  }

  exit(0);
}
