#include <stdio.h>
int main()
{
  int a,b,amari,i=0,j=0,k=0;

 
  scanf("%d%d",&a,&b);
  
  
  amari=b-a;
  
 
  
  if(a>0 && b>0){
    
    while(amari/1000>=1){ 
      i++;
      amari=amari-1000;
      
    }
    /*printf("%d",i);*/
    
    
    while(amari/500>=1){
      
      
      j++;
      amari=amari-500;
      
    }
    
    
    while(amari/100>=1)
      {
	k++;
	amari=amari-100;
      }
    
    
    printf("%d %d %d\n",i,j,k);	
  }
  /* printf("%d %d %d\n",i,j,k);*/
  return 0;
}