#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000 + 50;
const int INF = 1 << 30;
int n;
double a;
int main() {
  scanf("%d%lf", &n, &a);
  double ang = (double)(n - 2) * 180.0;
  ang /= n;
  double ang1 = ang / (n - 2);
  int cnt = floor(a / ang1);
  int ans = 0;
  double sum = 0;
  if (a - cnt * ang1 < (cnt + 1) * ang1 - a) {
    if (cnt == 0) cnt++;
    if (cnt + 2 > n) cnt = n - 2;
    printf("%d %d %d\n", cnt + 2, 1, 2);
  } else {
    if (cnt + 3 > n) cnt = n - 3;
    printf("%d %d %d\n", cnt + 3, 1, 2);
  }
  return 0;
}
