#include <bits/stdc++.h>
using namespace std;
const long long int MX = 100005;
const long long int mod = 1e9 + 7;
const long long int inf = 1LL << 62;
int dx4[] = {0, 0, -1, 1};
int dy4[] = {1, -1, 0, 0};
int dx[] = {1, 1, 1, 0, 0, -1, -1, -1};
int dy[] = {1, 0, -1, 1, -1, 1, 0, -1};
double cnt[MX];
int main() {
  int n, a, i, ans = 2;
  double theta, Sin, Cos;
  cin >> n >> a;
  theta = 2 * 3.1415926535897932384626433832795 / n;
  for (int i = 1; i <= n - 1; i++) {
    Sin = sin(theta * i);
    Cos = cos(theta * i);
    cnt[i] = asin((Sin) / sqrt((Cos - 1) * (Cos - 1) + Sin * Sin));
  }
  for (int i = 1; i <= n - 1; i++)
    cnt[i] *= 180 / 3.1415926535897932384626433832795;
  for (int i = 2; i <= n - 1; i++)
    if (fabs(cnt[1] - cnt[i] - a) < fabs(cnt[1] - cnt[ans] - a)) ans = i;
  cout << (2) << " " << (1) << " " << (ans + 1) << endl;
  return 0;
}
