#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  double min = 180, index = 0, alfa;
  cin >> n >> a;
  cout << 1 << ' ' << 2 << ' ';
  alfa = 180 * (double)(n - 2) / n;
  for (int i = 0; i < n - 2; i++) {
    if (abs(a - (alfa - (double)(alfa / (n - 2)) * i)) < min) {
      min = abs(a - (alfa - (double)(alfa / (n - 2)) * i));
      index = i;
    }
  }
  cout << 2 + index + 1;
}
