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