#include <bits/stdc++.h>
using namespace std;
int abs_(int a) {
  if (a > 0) {
    return a;
  } else {
    return -a;
  }
}
int main() {
  int a;
  int b;
  cin >> a;
  cin >> b;
  int cA = 0;
  int cD = 0;
  int cB = 0;
  int tempa;
  int tempb;
  for (int i = 1; i < 7; i++) {
    tempa = abs_(a - i);
    tempb = abs_(b - i);
    if (tempa < tempb) {
      cA++;
    } else if (tempa == tempb) {
      cD++;
    } else {
      cB++;
    }
  }
  cout << cA << " " << cD << " " << cB;
  return 0;
}
