#include <bits/stdc++.h>
int abs(int x) { return (x > 0) ? x : -x; }
int main() {
  int a, b, p1 = 0, p2 = 0, p3 = 0;
  scanf("%d%d", &a, &b);
  for (int i = 1; i <= 6; i++) {
    if (abs(a - i) < abs(b - i))
      p1++;
    else if (abs(a - i) > abs(b - i))
      p3++;
    else
      p2++;
  }
  printf("%d %d %d", p1, p2, p3);
}
