#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int i = 1;
  int counter1 = 0;
  int counter2 = 0;
  int counter3 = 0;
  while (i < 7) {
    if (abs(i - m) < abs(i - n)) {
      counter3++;
    }
    if (abs(i - m) > abs(i - n)) {
      counter1++;
    }
    if (abs(i - m) == abs(i - n)) {
      counter2++;
    }
    i++;
  }
  cout << counter1 << " " << counter2 << " " << counter3;
}
