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