#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c1, c2, c3;
  cin >> a >> b;
  if (a == b)
    cout << "0 6 0";
  else {
    int r = abs(a - b) - 1;
    if (a < b)
      cout << min(a, b) + r / 2 << " " << r % 2 << " " << 7 - max(a, b) + r / 2;
    else
      cout << 7 - max(a, b) + r / 2 << " " << r % 2 << " " << min(a, b) + r / 2;
  }
}
