#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n >> a;
  double x = 180.0 / n;
  double m = 365;
  int k;
  for (int i = 1; i <= n - 2; i++) {
    if (abs(i * x - a) < m) {
      m = abs(i * x - a);
      k = i;
    }
  }
  printf("%d %d %d\n", 2, 1, 2 + k);
  return 0;
}
