#include <bits/stdc++.h>
using namespace std;
int i, j, k;
int main() {
  int T = 1;
  ios_base::sync_with_stdio(0);
  for (k = 0; k < T; k++) {
    int a, b;
    cin >> a >> b;
    int f = 0, d = 0, s = 0;
    for (i = 1; i < 7; i++) {
      if (abs(i - a) < abs(i - b))
        f++;
      else if (abs(i - a) == abs(i - b))
        d++;
      else
        s++;
    }
    cout << f << " " << d << " " << s << endl;
  }
  return 0;
}
