#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};
signed main(void) {
  int n;
  double a;
  cin >> n >> a;
  double ang = (double)(n - 2) * 180 / n, b = ang / (n - 2), ans,
         ret = (1LL << 30);
  for (long long i = (long long)3; i < (long long)n + 1; ++i) {
    if (ret > abs(ang - a)) {
      ans = i;
      ret = abs(ang - a);
    }
    ang -= b;
  }
  cout << "1 2 " << ans << endl;
  return 0;
}
