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