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