#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, ans[3] = {};
  cin >> n >> m;
  for (int i = 0; i < 6; ++i) {
    if (max(n - 1, i) - min(n - 1, i) < max(m - 1, i) - min(m - 1, i))
      ++ans[0];
    else if (max(n - 1, i) - min(n - 1, i) == max(m - 1, i) - min(m - 1, i))
      ++ans[1];
    else
      ++ans[2];
  }
  cout << ans[0] << " " << ans[1] << " " << ans[2] << '\n';
}
