#include <bits/stdc++.h>
using namespace std;
int a, b;
int out[3];
void input() {
  cin >> a >> b;
  for (int i = 1; i <= 6; ++i) {
    if (abs(a - i) > abs(b - i))
      out[0]++;
    else if (abs(a - i) == abs(b - i))
      out[1]++;
    else
      out[2]++;
  }
  printf("%d %d %d\n", out[2], out[1], out[0]);
}
int main() {
  input();
  return 0;
}
