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