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