#include <bits/stdc++.h>
int main(void) {
  int n, a;
  scanf("%d%d", &n, &a);
  double d = 180.0 / n;
  double tmp = 180.0;
  int res = 0;
  for (int i = 1; i < n - 1; i++) {
    if (fabs(a - i * d) < tmp) {
      tmp = fabs(a - i * d);
      res = i;
    }
  }
  printf("%d %d %d\n", 1, 2, n - res + 1);
  return 0;
}
