// Adrians Zemturis
// Grupa: 110
// PR: 6.0
// Kompilators: Visual Studio Community 2022

using System;
using System.Collections.Generic;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace PLAYGROUND
{
    public class Program
    {
        static void DrawPattern1(int value)
        {
            Console.Write($"({value})\t");
        }
        static void DrawPattern2(int value)
        {
            Console.Write($"/{value}\\\t");
        }

        static void DrawPattern3(int value)
        {
            Console.Write($"|{value}|\t");
        }
        static void DrawPattern4(int value)
        {
            Console.Write("{" + value + "}\t");
        }

        static void Main(string[] args)
        {
            int x = 0;
            int y = 0;

            int x_m = 0;
            int y_m = 0;

            Console.WriteLine("Ievadi x vērtību: ");
            x = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Ievadi y vērtību: ");
            y = Convert.ToInt32(Console.ReadLine());



            for (int height = 0; height < x; height++)
            {

                for (int witdh = 0; witdh < y; witdh++)
                {
                    x_m = height % 2;
                    y_m = witdh % 2;

                    int heit_wit = (height + 1) * (witdh + 1);

                    if (y_m == 0 && x_m == 0)
                    {
                        DrawPattern1(heit_wit);
                    }
                    else if (y_m == 1 && x_m == 1)
                    {
                        DrawPattern2(heit_wit);
                    }
                    else if (y_m == 1 && x_m == 0)
                    {
                        DrawPattern3(heit_wit);
                    }
                    else if (y_m == 0 && x_m == 1)
                    {
                        DrawPattern4(heit_wit);
                    }

                }
                Console.WriteLine();
            }
        }
    }
}