#include <bits/stdc++.h>
using namespace std;
const int mx = 1e2 + 10;
int a, b;
int main() {
  scanf("%d%d", &a, &b);
  int r1 = 0, r2 = 0, r3 = 0;
  for (int i = 1; i <= 6; i++)
    if (abs(a - i) == abs(b - i))
      r2++;
    else if (abs(a - i) > abs(b - i))
      r3++;
    else
      r1++;
  printf("%d %d %d", r1, r2, r3);
  return 0;
}
