#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int vala = 0, valb = 0, vale = 0;
  cin >> a >> b;
  for (int i = 1; i <= 6; i++) {
    if (abs(a - i) > abs(b - i))
      vala++;
    else if (abs(a - i) == abs(b - i))
      vale++;
    else
      valb++;
  }
  cout << valb << " " << vale << " " << vala << endl;
  return 0;
}
