#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  scanf("%d %d", &n, &a);
  double change = 180.0 / n;
  double inf = 999999999999.0;
  int res;
  for (int i = 3; i <= n; ++i) {
    if (fabs(a - change * (i - 2)) < inf) {
      res = i;
      inf = fabs(a - change * (i - 2));
    }
  }
  printf("2 1 %d\n", res);
}
