#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-10;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double pi = acos(-1.0);
const int mod = 1e9 + 7;
const int maxn = 2e6 + 10;
int main() {
  int a, b;
  cin >> a >> b;
  double c = (a - 2) * 180.0 / a;
  double d = c * 1.0 / (a - 2);
  double sum = 10000, ans;
  for (int i = 3; i <= a; i++) {
    double s = (i - 2) * d;
    if (fabs(s - b) < sum) ans = i, sum = fabs(s - b);
  }
  cout << 2 << " " << 1 << " " << ans;
  return 0;
}
