#include <bits/stdc++.h>
using namespace std;
int a, b;
int Tenter() {
  cin >> a >> b;
  return 0;
}
int Tsolve() {
  int res_a = 0, res_b = 0, res_c = 0;
  for (int dice = (1); dice <= (6); dice++)
    if (abs(dice - a) < abs(dice - b))
      res_a++;
    else if (abs(dice - a) == abs(dice - b))
      res_c++;
    else
      res_b++;
  cout << res_a << " " << res_c << " " << res_b;
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  Tenter();
  Tsolve();
  return 0;
}
