import java.lang.Math.*

fun main(args:Array<String>?): Unit {
    val (r, x, y, n) = readLine()!!.trim().split(' ').map(String::toInt)
    val percentage = readLine()!!.trim().split(' ').map(String::toInt)
    val angles = IntArray(n + 1){if (it == 0) 0 else percentage[it - 1]}.let{percent ->
        for (i in 1 .. n) percent[i] += percent[i - 1]
        percent.map{Angle(sin(2 * PI * it / 100), cos(2 * PI * it / 100))}
    }
    val points = angles.map{Point(it.sin * r, it.cos * r)}
    val origin = Point(0, 0)
    val newOrigin = Point(x, y)
    println(
            (0 until n).joinToString(" "){i ->
                val defaultSize = r * r * PI * percentage[i] / 100
                val line = Line(points[i], points[i + 1])
                if (percentage[i] < 50) {
                    val mid = Angle.angleABC(line.endA + line.endB, origin, newOrigin)
                    val heightDiff = origin.distanceFrom(newOrigin) * mid.cos
                    val areaDiff = heightDiff * line.length / 2
                    ((defaultSize + areaDiff) / defaultSize * 100).toInt().toString()
                }else if (percentage[i] > 50){
                    val mid = Angle.angleABC(line.endA + line.endB, origin, newOrigin)
                    val heightDiff = origin.distanceFrom(newOrigin) * mid.cos
                    val areaDiff = heightDiff * line.length / 2
                    ((defaultSize - areaDiff) / defaultSize * 100).toInt().toString()
                }else {
                    val angle = Angle.angleABC(points[i], origin, newOrigin)
                    val diff = -angle.sin * r * origin.distanceFrom(newOrigin)
                    ((defaultSize + diff) / defaultSize * 100).toInt().toString()
                }
            }
    )
}

data class Point(val x: Double, val y: Double) {
    operator fun plus(that: Point): Point = Point(this.x + that.x, this.y + that.y)
    operator fun minus(that: Point): Point = Point(this.x - that.x, this.y - that.y)
    fun distanceFrom(that: Point): Double = (this - that).let{(x, y) -> sqrt(x * x + y * y)}
    constructor(x: Int, y: Int):this(x.toDouble(), y.toDouble())
}
class Line(val endA: Point, val endB: Point) {
    val length: Double = endA.distanceFrom(endB)
}
class Vector(from: Point, to: Point) {
    val x  = to.x - from.x
    val y = to.y - from.y
    fun dot(that: Vector): Double = this.x * that.x + this.y * that.y
    fun cross(that: Vector): Double = this.x * that.y - this.y * that.x
    val length: Double = sqrt(x * x + y * y)
}

class Angle(val sin: Double, val cos: Double) {
    val tan: Double
        get() = sin / cos
    val radian: Double = if (cos >= 0) asin(sin) else 2 * PI - asin(sin)
    operator fun minus(that: Angle): Angle = Angle(sin * that.sin - cos * that.cos, cos * that.cos + sin * that.sin)
    companion object {
        fun angleABC(a: Point, b: Point, c: Point): Angle {
            val ab = Vector(a, b)
            val bc = Vector(b, c)
            return Angle(ab.cross(bc) / ab.length / bc.length, ab.dot(bc) / ab.length / bc.length)
        }
    }
}
