\documentclass[a4paper,12pt,twosides]{article}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%         do not change upper part of the document          % 
%     put your definitions under the next comment block     %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{amssymb,latexsym, amsmath}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}

    \renewcommand{\refname}{\vskip -12mm}
\usepackage[paperwidth=165mm, paperheight=235mm, twoside, hmargin={25mm,20mm}, vmargin={20mm,20mm} ]{geometry}
\renewcommand{\familydefault}{\sfdefault}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newtheorem*{theom}{Theorem}

\newcommand{\ATitle}[4]{~\vskip 5mm

\noindent \textbf{\Large #1} \vskip -2mm

\noindent \HRule \vspace{-3mm}
\begin{flushright}
\noindent #2

\noindent \texttt{#3}\end{flushright}

\vskip 3mm

\noindent \textbf{\Large #4}


\vskip 3mm

}

\newcommand{\ATitleJ}[5]{~\vskip 5mm




\noindent \textbf{\Large #1} \vskip -2mm

\noindent \HRule \vspace{-3mm}
\begin{flushright}
\noindent #2

\noindent \texttt{#3}\end{flushright}

\vskip 3mm

\noindent \textbf{\Large #4}



\vskip 3mm

\noindent  Joint work with #5

\vskip 3mm

}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% put here your definitions and packages you are going to use %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\begin{document}


\thispagestyle{empty}



\ATitle{Name and surname}{Affiliation (Univerity, Country)}{email}{Title} %use this command if you do not have coauthor}



Text of Abstract
\begin{theom} Please put Theorems into environment. You may define new environment.
\end{theom}

\vskip 2cm

\ATitleJ{Name and surname}{Affiliation (Univerity, Country)}{email}{Title}{Coauthor} %use this command if you have coauthor}

Text of Abstract
\begin{thebibliography}{a}
\bibitem{1}
  Surname1, N1., Surname2, N2.,
  Title of the paper.
  Journal of something, Vol.\ nn No.\ n (2016), 1--13.
\end{thebibliography}




\end{document} 