#include <bits/stdc++.h>
using namespace std;
bool desc(long long i, long long j) { return i > j; }
long long d, x, y;
void gcd(long long A, long long B) {
  if (B == 0) {
    d = A;
    x = 1;
    y = 0;
  } else {
    gcd(B, A % B);
    long long temp = x;
    x = y;
    y = temp - (A / B) * y;
  }
}
long long power(long long x, long long n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return power((x * x) % 1000000007, n / 2);
  else
    return (x * power((x * x) % 1000000007, (n - 1) / 2)) % 1000000007;
}
long long ar[1100009], br[1100009], not_prime[1100009], vis[1100009];
void sieve() {
  not_prime[1] = 1;
  not_prime[0] = 1;
  for (long long p = 2; p * p <= 1100009; p++) {
    if (!not_prime[p]) {
      for (long long i = p * 2; i <= 1100009; i += p) not_prime[i] = 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  double j, k, a, b, c, vo, v1, flag, lans, m, r, l, ans, q, sum;
  string s;
  long long n, t = 1, i;
  while (t--) {
    cin >> n >> a;
    cout << "2 1 ";
    ans = 0, b = 1e9, c = 180 / (double)n;
    for (i = 3; i <= n; i++) {
      ans += c;
      if (abs(ans - a) < b) {
        b = abs(ans - a);
        lans = i;
      }
    }
    cout << lans;
  }
  return 0;
}
