#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m, temp = 0, f, l, d, cnt = 0, c = 0;
  cin >> n >> m;
  for (int i = 1; i <= 6; i++) {
    f = abs(n - i);
    l = abs(m - i);
    if (f < l) {
      temp++;
    } else if (f == l) {
      cnt++;
    } else {
      c++;
    }
  }
  cout << temp << " " << cnt << " " << c << " ";
  return 0;
}
