#include<stdio.h>

int main() {

   int n,m;
   scanf("%d\n%d",&n,&m);
   
   k = n/m
   p = n*1000/3600;
   printf("%d\n",k,p);
   
}