#include <bits/stdc++.h>
using namespace std;
int main() {
  int aa, bb, a, b;
  cin >> a >> b;
  int k1 = 0, k2 = 0, k3 = 0;
  for (int i = 1; i <= 6; i++) {
    if (fabs(i - a) > fabs(i - b)) k1++;
    if (fabs(i - a) < fabs(i - b)) k3++;
    if (fabs(i - a) == fabs(i - b)) k2++;
  }
  cout << k3 << " " << k2 << " " << k1;
}
