#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int c1 = 0, c2 = 0, c3 = 0;
  cin >> a >> b;
  for (int i = 1; i <= 6; ++i) {
    int m = abs(i - a);
    int n = abs(i - b);
    if (m == n)
      c3++;
    else if (m <= n)
      c1++;
    else
      c2++;
  }
  cout << c1 << " " << c3 << " " << c2;
  return 0;
}
