#include<iostream>
using namespace std;
int n, a, b;
int main() {
	while (true) {
		cin >> a >> b;
		if (a == 0 && b == 0) {
			break;
		}
		n = (b - a) / 100;
		cout << n % 5 << ' ' << (n / 5) % 2 << ' ' << n / 10 << endl;
	}
}