#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e3 + 7;
const int MOD = 998244353;
int n, a;
int main() {
  ios::sync_with_stdio(false), cout.tie(NULL);
  cin >> n >> a;
  double mn = 10000;
  int ans = 0;
  for (int i = 1; i <= n - 2; i++) {
    if (mn > abs(i * 180.0 / n - a)) mn = abs(i * 180.0 / n - a), ans = i;
  }
  cout << 1 << " " << n << " " << 1 + ans << endl;
  return 0;
}
