#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int a;
  int b;
  int dado[] = {1, 2, 3, 4, 5, 6};
  cin >> a >> b;
  int r1, r2, r3;
  r1 = r2 = r3 = 0;
  for (int i = 0; i < 6; ++i)
    abs(dado[i] - a)<abs(dado[i] - b) ? r1++ : abs(dado[i] - a)> abs(dado[i] -
                                                                     b)
        ? r2++
        : r3++;
  cout << r1 << " " << r3 << " " << r2 << endl;
  return 0;
}
