#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long i, j, k, a, b, x = 0, y = 0, z = 0;
  cin >> a >> b;
  for (i = 1; i <= 6; i++) {
    j = abs(a - i);
    k = abs(b - i);
    if (j == k)
      y++;
    else if (j > k)
      z++;
    else
      x++;
  }
  cout << x << " " << y << " " << z;
}
