#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll n, a;
  cin >> n >> a;
  pair<ll, int> result = {numeric_limits<ll>::max(), -1};
  for (int k = 1; k <= n - 2; k++)
    result = min(result, {abs(180 * n * k - 360 * k - a * n * (n - 2)), k});
  cout << 2 << " " << 1 << " " << result.second + 2 << endl;
}
