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