#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, a, i, m = 1000000, r, e, d, c, s = 1, f;
  cin >> n >> a;
  c = ((n - 2) * 180) / n;
  d = c / (n - 2);
  for (i = 0, s = 1; i < n - 2; i++, s++) {
    f = d * s;
    e = f - a;
    if (e < 0) e = -e;
    if (e < m) {
      m = e;
      r = n - s + 1;
    }
  }
  cout << 1 << " " << 2 << " " << r;
}
