#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[109];
int n, m, a, b, c;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= 6; i++) {
    if (abs(n - i) < abs(m - i)) a++;
    if (abs(n - i) == abs(m - i)) b++;
    if (abs(n - i) > abs(m - i)) c++;
  }
  cout << a << " " << b << " " << c;
  return 0;
}
