#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, v1 = 2, v2 = 1, v3;
  double diff = 1e9;
  scanf("%d%d", &n, &a);
  for (int v = n, t = n - 2; v >= 3; v--, t--) {
    if (fabs(180.0 * (n - 2) / n * t / (n - 2) - a) < diff) {
      v3 = v;
      diff = fabs(180.0 * (n - 2) / n * t / (n - 2) - a);
    }
  }
  printf("%d %d %d\n", v1, v2, v3);
  return 0;
}
