#include <bits/stdc++.h>
using namespace std;
int n, m, ans1, ans2, ans3;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= 6; i++) {
    if (abs(n - i) < abs(m - i)) ans1++;
    if (abs(n - i) == abs(m - i)) ans2++;
    if (abs(n - i) > abs(m - i)) ans3++;
  }
  cout << ans1 << " " << ans2 << " " << ans3 << endl;
  return 0;
}
