#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  int a, b;
  cin >> a >> b;
  int A = 0, B = 0, draw = 0;
  for (int i = 1; i <= 6; i++)
    if (abs(i - a) < abs(i - b))
      A++;
    else if (abs(i - a) > abs(i - b))
      B++;
    else
      draw++;
  cout << A << " " << draw << " " << B << "\n";
}
