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