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