#include <bits/stdc++.h>
int abs(int a, int b) {
  if (a > b) return a - b;
  return b - a;
}
int main() {
  int i, a, b, c1, c2, d, x, y;
  scanf("%d %d", &a, &b);
  c1 = c2 = d = 0;
  for (i = 1; i <= 6; i++) {
    x = abs(a, i);
    y = abs(b, i);
    if (x < y)
      c1++;
    else if (x > y)
      c2++;
    else
      d++;
  }
  printf("%d %d %d\n", c1, d, c2);
  return 0;
}
