﻿using System;

class Program
{
    static bool CanBorrow(int available, int active)
    {
        if (available < 0 || active < 0)
            throw new ArgumentOutOfRangeException();
        return available > 0 && active < 3;
    }

    static void Check(bool ok)
    {
        if (!ok) throw new Exception("Test esuat");
    }

    static void Main()
    {
        Check(CanBorrow(1, 2));
        Check(!CanBorrow(0, 2));
        Check(!CanBorrow(1, 3));
        Check(CanBorrow(1, 0));
        bool rejected = false;
        try { CanBorrow(-1, 0); }
        catch (ArgumentOutOfRangeException) { rejected = true; }
        Check(rejected);
        Console.WriteLine("5 verificari trecute");
    }
}
