#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long mo = 998244353;
long long sx, sy, ex, ey, dx[6] = {0, 1, 0, -1, 0, 0},
                          dy[6] = {1, 0, -1, 0, 0, 0}, m, n, k,
                          dz[6]{0, 0, 0, 0, -1, 1}, sg;
long long p, no, v, ans, w;
int par[550000];
long long a[500005], b[400005], c[500006], d1[400006], l[500006], r[500006];
int lg[200005], mi2[32], mn[30][200005];
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
set<long long> se;
struct node {
  long long u, v, w;
};
vector<node> eg;
long long qu(long long a, long long b, long long m) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans % m * a % m;
    }
    b >>= 1;
    a = a % m * a % m;
  }
  return ans;
}
int su(int n) {
  if (n == 1 || n == 0) return 0;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int fi(int a) {
  if (a == par[a])
    return a;
  else
    return par[a] = fi(par[a]);
}
map<int, int> mp, mp1[3];
map<pair<long long, long long>, int> mp2;
priority_queue<long long> que;
vector<int> g[400000], g1[400000];
vector<pair<long long, long long> > ve, ve1;
int cmp1(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
int cmp(node a, node b) { return a.w < b.w; }
int main() {
  int t, p2, p3;
  string s, ss, sss;
  long long l, r, n1, u;
  int tot = 1;
  char ch;
  while (cin >> n >> m) {
    for (int i = 1, j = n; i < j; i++, j--) {
      for (int k = 1, l = m; k <= m; k++, l--) {
        printf("%d %d\n", i, k);
        printf("%d %d\n", j, l);
      }
    }
    if (n % 2) {
      int no = n / 2 + 1;
      sg = 1;
      int y = 1;
      printf("%d %d\n", no, y);
      for (int j = m - 1; j >= 1; j--, sg = -sg) {
        y += j * sg;
        printf("%d %d\n", no, y);
      }
    }
  }
}
