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