#include <bits/stdc++.h>
using namespace std;
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int case1, case2, case3;
  case1 = case2 = case3 = 0;
  for (int i = 1; i <= 6; i++) {
    if (abs(a - i) < abs(b - i))
      case1++;
    else if (abs(a - i) > abs(b - i))
      case3++;
    else
      case2++;
  }
  cout << case1 << ' ' << case2 << ' ' << case3 << endl;
  return 0;
}
