#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  int n, a, k, v = 3;
  long double mn = 1e80, diff;
  cin >> n >> a;
  for (k = 3; k <= n; ++k) {
    diff = abs(1.l * (n - k + 1) / n * 180 - a);
    if (mn > diff) {
      mn = diff;
      v = k;
    }
  }
  cout << "1 2 " << v << '\n';
  return 0;
}
