#include<stdio.h>
#include<stdlib.h>

#define MAX 1000
typedef struct{
   double no;
   char name[MAX];
   double price;

}Book;

void createList(Book b[],int len);
double getElem(Book book[],int len);
void traverse(Book b[],int len,double max);

int main()
{
    Book book[MAX];

    int len;
    scanf("%d",&len);
    double max;
    createList(book,len);
    max = getElem(book,len);
    traverse(book,len,max);
    return 0;
}
void createList(Book b[],int len)
{

  for(int i=0;i<len;i++)
  {
      scanf("%lf",&b[i].no);
      scanf("%s",&b[i].name);
      scanf("%lf",&b[i].price);
  }
}
double getElem(Book book[],int len)
{
    double max = book[0].price;
    int count = 0;
    for(int i=1;i<len;i++)
    {
        if(book[i].price>max)
        {
            max = book[i].price;
            count++;
        }

    }
    printf("%d\n",count);
    return max;
}
void traverse(Book b[],int len,double max)
{
    for(int i=0;i<len;i++)
    {
        if(b[i].price == max)
        {
           printf("%.0lf ",b[i].no);
           printf("%s ",b[i].name);
           printf("%.2f",b[i].price);
           printf("\n");
        }

    }

}
02-12 16:23