#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, a;
  scanf("%lf %lf", &n, &a);
  double one = 180.0 - 360.0 / n;
  double cha = abs(a - one);
  double di = n - 2.0, zi = n - 3.0;
  int cnt = 3, ans = cnt;
  while (zi > 0.0) {
    cnt++;
    if (abs(a - zi * one / di) < cha) {
      cha = abs(a - zi * one / di);
      ans = cnt;
    }
    zi = zi - 1.0;
  }
  printf("1 2 %d\n", ans);
  return 0;
}
