#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c1 = 0, c2 = 0, c3 = 0, x, y;
  cin >> a >> b;
  for (int i = 1; i <= 6; i++) {
    x = a - i;
    y = b - i;
    if (x < 0) {
      x = x * -1;
    }
    if (y < 0) {
      y = y * -1;
    }
    if (x < y) {
      c1++;
    } else if (x > y) {
      c2++;
    } else if (x == y) {
      c3++;
    }
  }
  cout << c1 << " " << c3 << " " << c2 << endl;
  return 0;
}
