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