#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c = 0, d = 0, i, j, k = 0, l, n, m;
  cin >> n >> m;
  for (l = 1; l <= 6; l++) {
    a = abs(n - l);
    b = abs(m - l);
    if (a == b)
      c++;
    else if (a < b)
      d++;
    else
      k++;
  }
  cout << d << " " << c << " " << k << endl;
}
