#include <bits/stdc++.h>
using namespace std;
int n, a, i_;
double dv;
double Min = -1;
double tmp;
int main() {
  scanf("%d%d", &n, &a);
  dv = (double)180 / n;
  for (int i = 1; i <= n - 2; ++i) {
    tmp = (double)dv * i - a;
    if (tmp < 0) tmp = -tmp;
    if (tmp < Min or Min == -1) {
      Min = tmp;
      i_ = i;
    }
  }
  cout << 2 << ' ' << 1 << ' ' << 2 + i_;
  return 0;
}
