#include <bits/stdc++.h>
using namespace std;
int n, a, b, i;
double x = 1e9;
int main() {
  cin >> n >> a;
  cout << 2 << " " << 1 << " ";
  while (i < n - 2) {
    if (abs(a - 180.0 * (i + 1) / n) < x) {
      x = abs(a - 1.0 * (i + 1) / n * 180);
      b = i + 3;
    }
    i++;
  }
  cout << b;
}
