#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using namespace std;
int main() {
  long long a, b, p1 = 0, d = 0, p2 = 0;
  cin >> a >> b;
  for (int i = 1; i <= (int)(6); ++i) {
    if (abs(i - a) < abs(i - b)) {
      p1++;
    } else if (abs(i - a) > abs(i - b)) {
      p2++;
    } else {
      d++;
    }
  }
  cout << p1 << " " << d << " " << p2 << "\n";
  return 0;
}
