#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const double PI = 3.14159265358979323846;
int main() {
  if (0) {
    ios::sync_with_stdio(0);
    cin.tie(0);
  }
  int n, a;
  cin >> n >> a;
  int v1, v2, v3;
  v1 = 1;
  v2 = n;
  int best = 1;
  double C = 180. / n;
  for (int i = 1; i <= n - 2; ++i) {
    if (abs(C * i - a) < abs(C * best - a) + 1e-7) {
      best = i;
    }
  }
  cout << v1 << ' ' << v2 << ' ' << best + 1 << endl;
  return 0;
}
