#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, M = (1 << 25) + 5, OO = 0x3f3f3f3f;
const int negOO = -1e18;
int win1, draw, win2;
int n, m;
bool solve() {}
void init() {}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= 6; i++) {
    if (abs(n - i) < abs(m - i))
      win1++;
    else if (abs(n - i) == abs(m - i))
      draw++;
    else
      win2++;
  }
  printf("%d %d %d\n", win1, draw, win2);
  return 0;
}
