#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, mid, i, r[4], p = 0, q = 0;
  cin >> a >> b;
  mid = (a + b) / 2;
  int m = mid;
  if (a == b) {
    cout << "0 6 0";
  } else if ((a - b) % 2 == 0) {
    while (mid > 1) {
      mid--;
      p++;
    }
    while (m < 6) {
      m++;
      q++;
    }
    if (a < b)
      cout << p << " 1 " << q;
    else
      cout << q << " 1 " << p;
  } else {
    while (mid > 1) {
      mid--;
      p++;
    }
    while (m < 6) {
      m++;
      q++;
    }
    if (a < b)
      cout << p + 1 << " 0 " << q;
    else
      cout << q << " 0 " << p + 1;
  }
  return 0;
}
