This paper investigates the artificial neural network (ANN) to predict the dimensionless parameters for contact pressures and contact lengths under the rigid punch, the initial separation loads, and the initial separation distances of a contact problem. The problem consisted of two elastic infinitely layers (EL) loaded by means of a rigid cylindrical punch and resting on a half-infinite plane (HP). Firstly, the problem was formulated and solved theoretically using the Theory of Elasticity (ET). Secondly, the contact problem was extended based on the ANN. External load, the radius of punch, layer heights, and material properties were created by giving examples of different values used at the training and test stages of ANN. Finally, the accuracy of the trained neural networks for the case was tested using 134 new data, generated via ET solutions to determine the best network model. ANN results were compared with ET results, and well agreements were achieved.