// CHARACTERISTIC p = 31

j1 := (7*j0^21 + 14*j0^22 + 5*j0^23 + 17*j0^24 + 28*j0^25 + 4*j0^26 +
    12*j0^27 + 7*j0^28 + 5*j0^29 + 8*j0^30 + 17*j0^31)/(27 + 3*j0 +
    15*j0^2);


j2 := (28*j0^1116 + 15*j0^1115 + 21*j0^1114 + 17*j0^1113 + 7*j0^1112 +
    23*j0^1111 + 6*j0^1110 + 28*j0^1109 + 21*j0^1108 + 3*j0^1107 +
    17*j0^1106 + 7*j0^1087 + 20*j0^1086 + 6*j0^1085 + 2*j0^1084 +
    9*j0^1083 + 25*j0^1082 + 3*j0^1081 + j0^1080 + 7*j0^1079 +
    12*j0^1078 + 9*j0^1077 + 19*j0^1076 + 25*j0^1075 + 27*j0^1056 +
    27*j0^1055 + 20*j0^1054 + 8*j0^1053 + 22*j0^1052 + 29*j0^1051 +
    30*j0^1050 + 3*j0^1049 + j0^1048 + 11*j0^1047 + 27*j0^1046 +
    8*j0^1045 + 23*j0^1044 + 23*j0^1043 + 23*j0^1042 + 23*j0^1041 +
    21*j0^1040 + 27*j0^1039 + 18*j0^1038 + 8*j0^1037 + 19*j0^1036 +
    25*j0^1035 + 30*j0^1034 + 26*j0^1033 + 30*j0^1032 + 5*j0^1031 +
    12*j0^1030 + 10*j0^1029 + 12*j0^1028 + 7*j0^1027 + 12*j0^1026 +
    6*j0^1025 + 14*j0^1024 + 12*j0^1023 + j0^1022 + 18*j0^1021 +
    22*j0^1020 + 27*j0^1019 + 10*j0^1018 + 21*j0^1017 + 16*j0^1016 +
    14*j0^1015 + 16*j0^1014 + 8*j0^1013 + 13*j0^1012 + 5*j0^1011 +
    20*j0^1010 + 17*j0^1009 + 7*j0^1008 + 21*j0^1007 + 25*j0^1006 +
    8*j0^1005 + 5*j0^1004 + 4*j0^1003 + 29*j0^1002 + 18*j0^1001 +
    j0^1000 + 9*j0^999 + 16*j0^998 + 14*j0^996 + 15*j0^995 + 23*j0^994
    + j0^993 + 12*j0^992 + 10*j0^991 + 4*j0^989 + 3*j0^988 + 28*j0^987
    + 11*j0^986 + 16*j0^985 + 19*j0^984 + 21*j0^983 + 3*j0^982 +
    27*j0^981 + 20*j0^980 + 11*j0^978 + j0^977 + 16*j0^976 + 27*j0^975
    + 14*j0^974 + 27*j0^973 + 3*j0^972 + 30*j0^971 + j0^969 +
    14*j0^968 + 27*j0^967 + 23*j0^966 + 26*j0^965 + 20*j0^964 +
    26*j0^963 + 29*j0^962 + 12*j0^961 + 3*j0^960 + 23*j0^959 +
    18*j0^958 + 11*j0^957 + 2*j0^956 + 8*j0^955 + 16*j0^954 +
    16*j0^953 + 16*j0^952 + j0^951 + 15*j0^950 + 19*j0^949 + 3*j0^948
    + 14*j0^947 + 4*j0^946 + 2*j0^945 + 19*j0^944 + 2*j0^943 +
    24*j0^942 + 5*j0^941 + 7*j0^940 + 30*j0^939 + 8*j0^938 + 20*j0^937
    + 15*j0^936 + 12*j0^935 + 17*j0^934 + 18*j0^933 + 3*j0^932 +
    20*j0^931 + 30*j0^930 + 24*j0^929 + 27*j0^928 + 16*j0^927 +
    24*j0^926 + 6*j0^925 + 23*j0^924 + 24*j0^923 + 9*j0^922 +
    19*j0^921 + 19*j0^920 + 4*j0^919 + 18*j0^918 + 5*j0^917 + 4*j0^916
    + 27*j0^915 + 29*j0^914 + 29*j0^913 + 18*j0^912 + 5*j0^911 +
    23*j0^910 + 12*j0^909 + j0^908 + 13*j0^907 + 11*j0^906 + 23*j0^905
    + 15*j0^904 + 21*j0^903 + 2*j0^902 + 29*j0^901 + 30*j0^900 +
    24*j0^899 + 7*j0^898 + 14*j0^897 + 21*j0^895 + 19*j0^894 +
    18*j0^893 + 27*j0^892 + 2*j0^891 + 25*j0^890 + 2*j0^889 +
    25*j0^888 + 2*j0^887 + 3*j0^886 + 9*j0^885 + 21*j0^884 + 5*j0^883
    + 17*j0^882 + 24*j0^881 + 4*j0^880 + 5*j0^879 + 26*j0^878 +
    24*j0^877 + 24*j0^876 + 21*j0^875 + 18*j0^874 + 27*j0^873 +
    18*j0^872 + 11*j0^871 + 10*j0^870 + 28*j0^869 + 9*j0^868 +
    23*j0^867 + 18*j0^865 + 5*j0^864 + 27*j0^863 + 30*j0^862 +
    30*j0^861 + 8*j0^860 + 12*j0^859 + 30*j0^858 + 13*j0^857 +
    19*j0^856 + 19*j0^855 + 13*j0^854 + 2*j0^853 + 12*j0^852 +
    10*j0^851 + 30*j0^850 + 11*j0^849 + 15*j0^848 + 26*j0^847 +
    24*j0^846 + 13*j0^845 + 14*j0^844 + 19*j0^843 + 24*j0^842 +
    8*j0^841 + 9*j0^840 + 29*j0^839 + 8*j0^838 + 29*j0^837 + 29*j0^836
    + 28*j0^835 + 11*j0^834 + 6*j0^833 + 21*j0^831 + 18*j0^830 +
    26*j0^829 + 29*j0^828 + 7*j0^827 + 18*j0^826 + 2*j0^825 + j0^824 +
    23*j0^823 + 13*j0^822 + 25*j0^821 + 2*j0^820 + 17*j0^819 +
    12*j0^817 + 26*j0^816 + 11*j0^815 + 8*j0^814 + 13*j0^813 +
    11*j0^812 + 2*j0^811 + 15*j0^810 + 12*j0^809 + 15*j0^808 + j0^807
    + 29*j0^806 + 28*j0^805 + 13*j0^804 + 3*j0^803 + 26*j0^802 +
    27*j0^801 + 7*j0^800 + 20*j0^799 + 26*j0^798 + 3*j0^797 + 6*j0^796
    + 13*j0^795 + 22*j0^794 + 17*j0^793 + 24*j0^792 + 14*j0^791 +
    20*j0^790 + 17*j0^789 + j0^788 + 8*j0^787 + 28*j0^786 + 11*j0^785
    + 18*j0^784 + 23*j0^783 + 6*j0^782 + 4*j0^781 + 14*j0^780 +
    27*j0^779 + 18*j0^778 + 20*j0^777 + 13*j0^776 + 28*j0^775 +
    28*j0^774 + 13*j0^773 + 25*j0^772 + 14*j0^771 + 25*j0^770 +
    7*j0^769 + 2*j0^768 + 5*j0^767 + 11*j0^766 + 22*j0^765 + 10*j0^764
    + 12*j0^763 + 19*j0^762 + 19*j0^761 + 15*j0^760 + 12*j0^759 +
    23*j0^758 + 25*j0^757 + 24*j0^756 + 16*j0^755 + 26*j0^754 +
    24*j0^753 + 2*j0^752 + 12*j0^751 + 10*j0^749 + 13*j0^748 +
    24*j0^747 + 15*j0^746 + 30*j0^745 + 18*j0^744 + 7*j0^743 +
    20*j0^742 + 9*j0^741 + 13*j0^740 + 24*j0^739 + 12*j0^738 +
    20*j0^737 + 23*j0^736 + 17*j0^735 + 10*j0^734 + 8*j0^733 +
    16*j0^732 + 14*j0^731 + 28*j0^730 + 13*j0^729 + 26*j0^728 +
    29*j0^727 + 9*j0^726 + 9*j0^725 + 21*j0^724 + 18*j0^723 +
    21*j0^722 + 17*j0^721 + 29*j0^720 + 12*j0^719 + 24*j0^718 +
    20*j0^717 + 22*j0^716 + 4*j0^715 + 24*j0^714 + 27*j0^713 +
    16*j0^712 + 7*j0^711 + 4*j0^710 + 10*j0^709 + 16*j0^708 +
    10*j0^707 + 20*j0^706 + 24*j0^705 + 21*j0^704 + 13*j0^703 +
    18*j0^702 + 13*j0^701 + 2*j0^700 + 13*j0^699 + 25*j0^698 +
    14*j0^696 + 7*j0^695 + 8*j0^694 + 15*j0^693 + 4*j0^692 + 27*j0^691
    + 24*j0^690 + 27*j0^689 + 8*j0^688 + 12*j0^687 + 21*j0^686 +
    24*j0^685 + 22*j0^684 + j0^683 + 22*j0^682 + 13*j0^681 + 8*j0^680
    + 10*j0^679 + 12*j0^678 + 13*j0^677 + 12*j0^676 + 21*j0^675 +
    5*j0^674 + 2*j0^673 + 19*j0^672 + 10*j0^671 + 9*j0^670 + j0^669 +
    20*j0^668 + 13*j0^667 + 17*j0^665 + 22*j0^664 + 18*j0^663 +
    24*j0^662 + 7*j0^661 + 14*j0^660 + 26*j0^659 + 21*j0^658 +
    2*j0^657 + 25*j0^656 + 19*j0^655 + 11*j0^654 + 5*j0^653 +
    16*j0^652 + 22*j0^651 + 15*j0^650 + 21*j0^649 + 17*j0^648 +
    7*j0^647 + 23*j0^646 + 6*j0^645 + 28*j0^644 + 21*j0^643 + 3*j0^642
    + 17*j0^641 + 3*j0^622 + 13*j0^621 + 24*j0^620 + 22*j0^591 +
    23*j0^590 + 21*j0^589 + 16*j0^560 + 28*j0^559 + 4*j0^558 +
    28*j0^529 + 18*j0^528 + 7*j0^527 + 29*j0^498 + 12*j0^497 +
    15*j0^496 + 6*j0^467 + 26*j0^466 + 17*j0^465 + 26*j0^436 +
    30*j0^435 + 22*j0^434 + 9*j0^405 + 8*j0^404 + 10*j0^403 +
    17*j0^374 + 22*j0^373 + 12*j0^372 + 6*j0^343 + 26*j0^342 +
    17*j0^341)/(j0^157 + 25*j0^156 + 8*j0^155 + 27*j0^126 + 24*j0^125
    + 30*j0^124 + 18*j0^95 + 16*j0^94 + 20*j0^93 + 10*j0^64 + 2*j0^63
    + 18*j0^62 + 9*j0^33 + 8*j0^32 + 10*j0^31 + 16*j0^2 + 28*j0 + 4);
