#include <bits/stdc++.h>
using namespace std;
int getnum() {
  char ch;
  while (ch = getchar(), ch == 10 || ch == 32)
    ;
  int ans = ch - 48;
  while ((ch = getchar()) != EOF && (ch >= '0' && ch <= '9')) {
    ans *= 10;
    ans += ch - '0';
  }
  return ans;
}
int main(int argc, char *argv[]) {
  int a, b;
  while (scanf("%d %d", &a, &b) != EOF) {
    int q = 0, w = 0, e = 0;
    for (int i = 1; i <= 6; i++) {
      if ((int)fabs(i - a) < (int)fabs(i - b))
        q++;
      else if ((int)fabs(i - a) > (int)fabs(i - b))
        e++;
      else
        w++;
    }
    printf("%d %d %d\n", q, w, e);
  }
  return 0;
}
