#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, a, div, mul, ans, mn = 10000000, v3, dv;
  int m, i;
  cin >> n >> a;
  if (n == 3)
    cout << "1 2 3" << endl;
  else {
    m = n - 2;
    div = 180.0 / n;
    dv = div;
    for (i = 1; i <= m; i++) {
      div = dv * i;
      ans = abs(div - a);
      if (ans < mn) {
        mn = ans;
        v3 = n + 1 - i;
      }
    }
    cout << "1 2 " << v3 << endl;
  }
}
