#include <bits/stdc++.h>
using namespace std;
int n, a, c;
double b;
int main(void) {
  scanf("%d%d", &n, &a);
  b = 180 / (double)n;
  c = a / b;
  if (a - c * b > (c + 1) * b - a) c++;
  if (!c) c++;
  printf("2 1 %d", min(3 + (c - 1), n));
}
