#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int first = 0, second = 0, draw = 0;
  for (int i = 1; i <= 6; ++i) {
    if (abs(a - i) < abs(b - i)) {
      ++first;
      continue;
    }
    if (abs(b - i) < abs(a - i)) {
      ++second;
      continue;
    }
    ++draw;
  }
  cout << first << ' ' << draw << ' ' << second;
}
