#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  scanf("%d%d", &n, &a);
  int x = a * n / 180;
  if (a * n - 180 * x > 180 * (x + 1) - a * n) x++;
  x = min(x, n - 2);
  x = max(x, 1);
  printf("1 %d %d\n", n, 1 + x);
  return 0;
}
