#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, count_a = 0, count_d = 0, count_b = 0, d = 1;
  cin >> a >> b;
  while (d <= 6) {
    if (abs(a - d) < abs(b - d))
      count_a++;
    else if (abs(a - d) > abs(b - d))
      count_b++;
    else
      count_d++;
    d++;
  }
  cout << count_a << " " << count_d << " " << count_b;
  return 0;
}
